Skip to content

Commit b7c8526

Browse files
committed
fix: renamed example files to match the correct execution order
1 parent 48e17f5 commit b7c8526

14 files changed

Lines changed: 27 additions & 33 deletions

src/main/java/examples/EXAMPLES_GUIDE.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ interpolations:
6161
- **Sequence Set**: Multiple sequences
6262

6363
```bash
64-
mvn exec:java -Dexec.mainClass="examples.Hello_World"
64+
mvn exec:java -Dexec.mainClass="examples.N01_Hello_World"
6565
```
6666

6767
**Output**: WKT and MF-JSON representations of temporal types
@@ -80,7 +80,7 @@ Same as Hello_World but uses **geodetic coordinates** (latitude
8080
longitude on Earth's surface) instead of planar coordinates.
8181

8282
```bash
83-
mvn exec:java -Dexec.mainClass="examples.Hello_World_Geodetic"
83+
mvn exec:java -Dexec.mainClass="examples.N01_Hello_World_Geodetic"
8484
```
8585

8686
**Difference from Hello_World**:
@@ -104,7 +104,7 @@ T,MMSI,Latitude,Longitude,SOG
104104
```
105105

106106
```bash
107-
mvn exec:java -Dexec.mainClass="examples.AIS_Read"
107+
mvn exec:java -Dexec.mainClass="examples.N02_AIS_Read"
108108
```
109109

110110
**Output**: Sample records converted to temporal points
@@ -131,7 +131,7 @@ Assembles individual observations into complete ship trajectories.
131131
`ais_trips_new_assemble.csv`
132132

133133
```bash
134-
mvn exec:java -Dexec.mainClass="examples.AIS_Assemble"
134+
mvn exec:java -Dexec.mainClass="examples.N03_AIS_Assemble"
135135
```
136136

137137
**Process**:
@@ -163,7 +163,7 @@ Similar to AIS_Assemble but for synthetic vehicle data in Brussels.
163163
**Output**: `berlinmod_trips_new_assemble.csv`
164164

165165
```bash
166-
mvn exec:java -Dexec.mainClass="examples.BerlinMOD_Assemble"
166+
mvn exec:java -Dexec.mainClass="examples.N03_BerlinMOD_Assemble"
167167
```
168168

169169
**Differences from AIS**:
@@ -194,7 +194,7 @@ docker run --name postgres-mobilitydb \
194194
```
195195

196196
```bash
197-
mvn exec:java -Dexec.mainClass="examples.AIS_Store"
197+
mvn exec:java -Dexec.mainClass="examples.N04_AIS_Store"
198198
```
199199

200200
**Note**: as explained in the source file and in the "Troubleshooting"
@@ -222,7 +222,7 @@ Processes large AIS datasets by streaming to database instead of holding
222222
everything in memory.
223223

224224
```bash
225-
mvn exec:java -Dexec.mainClass="examples.AIS_Stream_DB"
225+
mvn exec:java -Dexec.mainClass="examples.N04_AIS_Stream_DB"
226226
```
227227

228228
**Strategy**:
@@ -244,7 +244,7 @@ mvn exec:java -Dexec.mainClass="examples.AIS_Stream_DB"
244244
Same concept as AIS_Stream_DB but writes to CSV file instead.
245245

246246
```bash
247-
mvn exec:java -Dexec.mainClass="examples.AIS_Stream_File"
247+
mvn exec:java -Dexec.mainClass="examples.N04_AIS_Stream_File"
248248
```
249249

250250
**Output**: `ais_trips_new_stream.csv`
@@ -266,7 +266,7 @@ observations.
266266
observations)
267267

268268
```bash
269-
mvn exec:java -Dexec.mainClass="examples.BerlinMOD_Disassemble"
269+
mvn exec:java -Dexec.mainClass="examples.N05_BerlinMOD_Disassemble"
270270
```
271271

272272
**Process**:
@@ -299,7 +299,7 @@ Analyzes how much distance vehicles travel in each Brussels commune
299299
- `berlinmod_trips.csv` - 154 vehicle trips
300300

301301
```bash
302-
mvn exec:java -Dexec.mainClass="examples.BerlinMOD_Clip"
302+
mvn exec:java -Dexec.mainClass="examples.N06_BerlinMOD_Clip"
303303
```
304304

305305
**Process**:
@@ -333,7 +333,7 @@ Veh | Distance | 1 2 3 ... | Inside | Outside
333333
Divides space and time into regular grids (tiles) and aggregates trips.
334334

335335
```bash
336-
mvn exec:java -Dexec.mainClass="examples.BerlinMOD_Tile"
336+
mvn exec:java -Dexec.mainClass="examples.N07_BerlinMOD_Tile"
337337
```
338338

339339
**Two types of tiles**:
@@ -380,7 +380,7 @@ Speed
380380
Reduces trajectory complexity while preserving shape.
381381

382382
```bash
383-
mvn exec:java -Dexec.mainClass="examples.BerlinMOD_Simplify"
383+
mvn exec:java -Dexec.mainClass="examples.N08_BerlinMOD_Simplify"
384384
```
385385

386386
**Two algorithms**:
@@ -420,7 +420,7 @@ statistics
420420
Calculates how many vehicles are active simultaneously at each hour.
421421

422422
```bash
423-
mvn exec:java -Dexec.mainClass="examples.BerlinMOD_Aggregate"
423+
mvn exec:java -Dexec.mainClass="examples.N09_BerlinMOD_Aggregate"
424424
```
425425

426426
**Process**:
@@ -549,7 +549,7 @@ double dist = tpoint_distance(trip1, trip2);
549549
mvn exec:java -Dexec.mainClass="AIS_Read"
550550

551551
# ✅ Correct (include package)
552-
mvn exec:java -Dexec.mainClass="examples.AIS_Read"
552+
mvn exec:java -Dexec.mainClass="examples.N02_AIS_Read"
553553
```
554554

555555

src/main/java/examples/Hello_World.java renamed to src/main/java/examples/N01_Hello_World.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import static functions.functions.*;
1212

13-
public class Hello_World {
13+
public class N01_Hello_World {
1414

1515

1616
public static void main(String[] args) throws SQLException {

src/main/java/examples/Hello_World_Geodetic.java renamed to src/main/java/examples/N01_Hello_World_Geodetic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import static functions.functions.*;
1212

13-
public class Hello_World_Geodetic {
13+
public class N01_Hello_World_Geodetic {
1414

1515

1616
public static void main(String[] args) throws SQLException {
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import functions.error_handler;
44
import functions.error_handler_fn;
55
import jnr.ffi.Pointer;
6-
import types.basic.tfloat.TFloatInst;
7-
import types.basic.tpoint.tgeog.TGeogPointInst;
86

97
import java.io.BufferedReader;
108
import java.io.FileReader;
@@ -24,7 +22,7 @@
2422
* This simple program does not cope with erroneous inputs, such as missing
2523
* fields or invalid timestamp values.
2624
*/
27-
public class AIS_Read {
25+
public class N02_AIS_Read {
2826

2927
static class AISRecord {
3028
OffsetDateTime T;

src/main/java/examples/AIS_Assemble.java renamed to src/main/java/examples/N03_AIS_Assemble.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import jnr.ffi.Memory;
66
import jnr.ffi.Pointer;
77
import jnr.ffi.Runtime;
8-
import types.basic.tfloat.TFloatInst;
9-
import types.basic.tpoint.tgeog.TGeogPointInst;
108
import types.temporal.TInterpolation;
119

1210
import java.io.*;
@@ -28,7 +26,7 @@
2826
* observations for the same ship with equal timestamp values and supposes that
2927
* the observations are in increasing timestamp value.
3028
*/
31-
public class AIS_Assemble {
29+
public class N03_AIS_Assemble {
3230
/* Number of instants in a batch for printing a marker */
3331
static final int NO_INSTS_BATCH = 10000;
3432
/* Maximum number of trips */

src/main/java/examples/BerlinMOD_Assemble.java renamed to src/main/java/examples/N03_BerlinMOD_Assemble.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* https://epsg.io/3857
3030
* and the timestamps are given in the Europe/Brussels time zone.
3131
*/
32-
public class BerlinMOD_Assemble {
32+
public class N03_BerlinMOD_Assemble {
3333

3434
/* Maximum number of instants in an input trip */
3535
static final int MAX_NO_INSTS = 64000;
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import functions.error_handler;
44
import functions.error_handler_fn;
5-
import jnr.ffi.Pointer;
65

76
import java.io.*;
87
import java.sql.*;
@@ -36,7 +35,7 @@
3635
* docker exec -it container_name /bin/bash
3736
* mvn exec:java -Dexec.mainClass="examples.AIS_Store"
3837
*/
39-
public class AIS_Store {
38+
public class N04_AIS_Store {
4039

4140
/* Number of instants in a batch for printing a marker */
4241
static final int NO_INSTS_BATCH = 10000;

src/main/java/examples/AIS_Stream_DB.java renamed to src/main/java/examples/N04_AIS_Stream_DB.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* SETUP: Same as AIS_Store.java - use mobilitydb/mobilitydb Docker image
3333
*/
34-
public class AIS_Stream_DB {
34+
public class N04_AIS_Stream_DB {
3535

3636
/* Number of instants to send in batch to the database */
3737
static final int NO_INSTS_BATCH = 1000;

src/main/java/examples/AIS_Stream_File.java renamed to src/main/java/examples/N04_AIS_Stream_File.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* This program is similar to AIS_Stream_DB but writes to a file instead of a database.
2323
* The accumulated temporal values are appended to the output file regularly.
2424
*/
25-
public class AIS_Stream_File {
25+
public class N04_AIS_Stream_File {
2626

2727
/* Number of instants to send in batch to the file */
2828
static final int NO_INSTS_BATCH = 1000;

src/main/java/examples/BerlinMOD_Disassemble.java renamed to src/main/java/examples/N05_BerlinMOD_Disassemble.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* This version works directly with MEOS C pointers to avoid Java wrapper issues.
1919
*/
20-
public class BerlinMOD_Disassemble {
20+
public class N05_BerlinMOD_Disassemble {
2121

2222
static class TripRecord {
2323
int tripId;

0 commit comments

Comments
 (0)