eurostat / searoute

Compute shortest maritime routes between ports
European Union Public License 1.2
157 stars 33 forks source link

path to 'marnet/marnet_plus_20km.gpkg' #63

Closed cbeavis-frameworks closed 2 years ago

cbeavis-frameworks commented 2 years ago

Hi jgaffuri,

I'm trying to add the SeaRoute package to a new Maven project following the tutorial and I'm getting this run time error...

java.lang.RuntimeException: Unable to obtain connection: path to 'marnet/marnet_plus_20km.gpkg': '/Users/chrisbeavis/searoute-test/marnet' does not exist at org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:2147) at org.geotools.jdbc.JDBCDataStore.createTypeNames(JDBCDataStore.java:934) at org.geotools.data.store.ContentDataStore.getTypeNames(ContentDataStore.java:261) at eu.europa.ec.eurostat.searoute.SeaRouting.(SeaRouting.java:77) at eu.europa.ec.eurostat.searoute.SeaRouting.(SeaRouting.java:57)

I've tracked it down to the marnet file not being located, line 61 of the SeaRouting.java file

File file = null; try { URL resource = getClass().getClassLoader().getResource("marnet/marnetplus"+resKM+"km.gpkg"); file = new File(resource.toURI()); }

But when I inspect the URI and look in the Maven Dependencies it looks like the file is there (see images)

Any help would be greatly appreciated,

Chris

image
cbeavis-frameworks commented 2 years ago

Found the answer in the previous issue:

https://github.com/eurostat/searoute/issues/61