Giter VIP home page Giter VIP logo

searoute's Introduction

SeaRoute

Maven Central

SeaRoute computes shortest maritime routes between two locations.

See below an example from Marseille (5.3E,43.3N) to Shanghai (121.8E,31.2N). The red line is the computed maritime route. The black line is the great-circle route.

From Marseille to Shangai

Usage

As a program

SeaRoute requires Java 1.9 or higher. Run java --version to check if Java is installed and what is the current version.

Download the lastest release here and unzip it somewhere.

Examples of executions for windows users are provided in searoute.bat (for linux users, see searoute.sh). test_input.csv is an example of input file. It is a simple CSV file with origin/destination coordinates of the routes. Note that only geographical coordinates (decimal degrees) are supported. The output file is a GeoJSON (*.geojson) file. This file can be displayed with any modern GIS software such as QGIS, or also with geojson.io. Each route has the same properties as the input CSV file, with three additional properties:

  • distKM, which is the length of the route, in KM
  • dFromKM (respectivelly dToKM), which is the distance in KM between the origin (repectivelly destination) position and the closest node of the maritime network. This value measure the approximation arount the origin (respectivelly destination) position. The smaller, the better.

Run java -jar searoute.jar -h to see the help, with a description of all input parameters.

Example

For coders

SeaRoute can be used as a Java library, which can be retrieved using Maven. For that, simply add it as a dependency to the pom.xml file:

<dependency>
	<groupId>eu.europa.ec.eurostat</groupId>
	<artifactId>searoute-core</artifactId>
	<version>X.Y</version>
</dependency>

Where X.Y is the current version number, as available Maven central repository.

For more information on how to setup a coding environment based on Eclipse, see this page.

Here is an example of shortest maritime route computation:

//create the routing object
SeaRouting sr = new SeaRouting();

//get the route between Marseille (5.3E,43.3N) and Shanghai (121.8E,31.2N)
Feature route = sr.getRoute(5.3, 43.3, 121.8, 31.2);

//compute the route distance in km
MultiLineString routeGeom = (MultiLineString) route.getGeometry();
double d = GeoDistanceUtil.getLengthGeoKM(routeGeom);

For further overview, see the documentation.

As a webservice

To deploy SeaRoute as a webservice (Java servlet), run:

git clone https://github.com/eurostat/searoute.git
cd modules/searoute-war
mvn clean package

and move the servlet /target/searoute-XXX.war into your /tomcatX.Y/webapps/ folder. Go then to http://localhost:8080/searoute/ to see the REST-API documentation and some examples.

Some additional information

The shortest maritime routes are computed from a network of lines covering the seas and following some of the most frequent martitime routes. This maritime network is based on the Oak Ridge National Labs CTA Transportation Network Group, Global Shipping Lane Network, World, 2000 (retrieved from geocommons.com or github), enriched with some additional lines around the European coasts based on AIS data. Simplified versions of this network have been produced for different resolutions (5km, 10km, 20km, 50km, 100km) based on a shrinking of too short edges and a removal of similar edges. For more detail on this generalisation algorithm, see the marnet module based on (JGiscoTools)[https://github.com/eurostat/JGiscoTools].

Maritime network overview

SeaRoute can be reused with custom maritime networks produced from some other custom maritime line datasets. The module marnet provides some utilities and examples for the creation and preparation of such maritime network datasets, with generalisation methods. To be able to handle channels, straits and passages such as Suez and Panama channels, the custom maritime sections need to be characterised with a new property pass set with the values suez and panama for the network sections passing by the Suez and Panama channels. The program will then be able to recognise them and possibly avoid them, on user request. The following straits, channels and passages are currently supported:

  • Suez channel
  • Panama channel

since version v3.5:

  • Malacca strait
  • Gibraltar strait
  • Dover strait
  • Bering strait
  • Magellan strait
  • Bab-el-Mandeb strait
  • Kiel channel
  • Corinth channel
  • Northwest passage
  • Northeast passage

The shortest maritime routes are computed from this network using the Dijkstra's algorithm implemented in the wonderful GeoTools library.

Support and contribution

Feel free to ask support, fork the project or simply star it (it's always a pleasure). If anyone feels like helping fixing the existing issues, you are welcome !

searoute's People

Contributors

chillax avatar jgaffuri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

searoute's Issues

Alternative shortest path algorithm

Consider using an alternative, more efficient, shortest path algo. Dijskra is currently used. A* (or ACO) could be used, taking into account the toric shape of the network. To be tested !

Excellent project

Just to say thank you for sharing.
I remember I came here a year ago and I appreciated it a lot (but maybe it was difficult for me to understand the details).
Now I've really started using the latest release inside a web project (flask py). Very good to see the options to avoid the canals!
Moreover only now I realized that even if the engine is Java it's only a matter of downloading and unzipping the jdk, a real setup is not even needed. I also understand now that there is very little or nothing specific to tomcat. At the moment I am redirecting to geojson.io as per your read me but there is a limitation for the max length of url encoding (when done only via a link). But here (I'm looking at that now) there is even the webapp with the ajax and the code for a leaflet front end (usable with any backend, so again, also without war and tomcat). In conclusion, thank you for the great work, for sharing all the code but also for explaining and clarifying a lot of things!

More detailed routes network ?

Hello, we are working on a system that uses this great project. We are very satisfied of the ouput where processing Europe routes but we're experiencing some strange route outputs where the routes network is less detailed (we're using the 5km one).

So I have 2 questions :

  • How can we easily add new routes to the network ? Is there a tool you're using or something.
  • Do you have a more precise routes network that we can use, maybe on a 1km scale ?

Thank you for your amazing work.

found non-noded intersection between LINESTRING

We got follwing error while adding linestrings to the existing marnet db, for default resolution.:-

"found non-noded intersection between LINESTRING ( -72.8888888888889 24.22222222222221, -72.66666666666666 24.66666666666668 ) and LINESTRING ( -72.66666666666667 24.66666666666666, -72.83333333333333 23.83333333333333 ) [ (-72.66666666666667, 24.666666666666643, NaN)"

I want to improve the marnet data for a detailed and finer route creation by adding linestrings obtained from the past AIS data of ship tracks. Followed the instructions as per readme file .

"SeaRoute can be reused with custom maritime networks produced from some other custom maritime line datasets. The module marnet provides some utilities and examples for the creation and preparation of such maritime network datasets, with generalisation methods."

Can anybody provide some insights or some other alternatives??
Brgds

Running Sea Route with 5km Detailed gpkg file

image

Hello,

I am having the issue, as shown in the image above with the 5km detailed gpkg file and was wondering if you have encountered this issue before? If so, what is the solution?

Thank you.

Using the library to route between 10 min difference GPS points

Hi, I am investigating using a GPS device which can send its location every 10 minutes, to track my boat.
I would like to display the sailed route on map. Currently I am doing so with dots for each location.
I would like to connect the dots with a line, but would like to take into account islands and other land features. Basically calculate the shortest route between two GPS points, and do so for every point.

Would this library be efficient for the above use case?

Log4j vulnerability

@chillax @jgaffuri

Following imports have been found

SeaRouting.java
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

MarnetBuilding.java
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.config.Configurator;

and couldn't find any reference of log4j in pom.xml

Can you help us to identify and resolve the vulnerability.

Salina Cruz Issue

Hello,
There is a small issue with Salina Cruz on the West coast of Mexico, the searoute algorithm seems to think Salina Cruz is on the East Coast when calculating the distances.
Great work, thanks a lot

Impossible to rebuild shp file with information suez and panam straits

Without any changes to the marnet_densified.geojson, I rebuilt the marnet_plus_5KM.shp.
However, this file does not contain information about suez and panam straits.
Therefore, we don't have the possibility to allow the route to go through the Suez channel or not. It is always suez.
Perhaps there is a mistake on the geojson file?
Do you have an alternative proposal we should consider?

Suez location

Hello, When I try to compute a route between ports in egypt in the red sea and ports all around the word, the program seems to think they are on the wrong side of the suez canal. Where would it be possible to change the position of the suez canal according to the program?
Thankyou

Errors when calculating some routes

I'm trying to calculate the distance between a set of routes (~80,000) and some are raising errors. I've tried taking samples of 100 routes at a time and running them through the .jar file to narrow down which were the exceptions. Here's one example from Indonesia to Egypt - I can provide more if necessary but it's a bit of detective work to find them.

I ran this with both Panama and Suez canals unavailable.

route name olat olon dlat dlon
Bontang_Safaga 0.101287 117.470056 29.635942 32.380686

Can you help to identify the reason that this route is failing?

Help or contribute to this project

Congratulations on your excellent work.

I would like to help or contribute to this project.

However, I'm a senior Java Developer and I have no experience with GIS.
I want to deepen my knowledge.

I downloaded the QGIS tool to open the .shp file to understand how points are organized but I have still not managed to understand the logic.

I would like to know what you did, that is to say to create Points from Coordinate Data
and put them in a .shp file.

For instance, create a network with a resolution 75 km.

What steps are needed to achieve this?

Many thanks in advance for your assistance, and I am looking forward to hearing from you.
Emmanuel

Cannot recompile sharefiles

I'm not a java developer, so some of these may be (hopefully) simple problems I'm running into.
I'm trying to make sure that ships routed around Somalia and Yemen follow the IRTC rather than the other shipping routes in the GeoJSON. I'm able to edit the marnet files to remove some nodes, but I'm unable to regenerate the shapefiles. I'm missing mar_ais_gisco.geojson and ef.geojson which don't seem to be included in the repository.

In addition, is it possible for me to package a new jar from the repo? I'm not really familiar with Maven here so any help is appreciated.

Thanks again for the amazing resource! I've also packaged the code into a Jetty server running inside a Docker container here - https://hub.docker.com/r/hrishioa/gw-sr. Please feel free to use as you see fit if it helps the project!

build failure: missing artifact org.opencarto

First of all, this repo looks wonderful! Thank you so much for sharing.
I have a little issue: I've downloaded maven to compile it but I'm getting this error: what am I doing wrong?

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:33 min
[INFO] Finished at: 2019-02-04T20:13:39+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project searoute: Could not resolve dependencies for project eu.europa.ec.eurostat:sea
route:war:0.9: Could not find artifact org.opencarto:opencarto:jar:1.3.2-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Thanks in advance for your kind reply.

More information on AIS route enrichment

Searoute as a library works great. But with the exception of Europe mostly, the routes are sparse. I've tried to enrich the data file with a ton of additional AIS routes (based on a year of somewhat cleaned AIS data). It took a while to run MarnetBuilding but in the end I came up with some rather strange route recommendations (e.g Rotterdam to New York had a detour up to Scotland and back).
How did you come up with your AIS routes? Do I just have to be more careful with my data set or do I need a special preprocessing?

make webservice

First of all thank you for developing the searoute tool I generated some routes and it works well.

However I could not get the webservice going. I followed the instructions:
git clone https://github.com/eurostat/searoute.git
cd modules/searoute-war
mvn clean package

However the folder modules does not contain the folder searoute-war (however folder war is present). Also after building the package (reported as a success) and there is no .war file to place in the tomcat folder. Am I overlooking something?

Dependency issue - build broke

Hi, thanks for sharing this repository, this is awesome!

I'm trying to run mvn clean install and am getting this error:

[ERROR] Failed to execute goal on project searoute: Could not resolve dependencies for project eu.europa.ec.eurostat:searoute:war:1.3-SNAPSHOT: The following artifacts could not be resolved: org.geotools:gt-main:jar:22.3, org.geotools:gt-graph:jar:22.3, org.geotools:gt-shapefile:jar:22.3, org.geotools:gt-cql:jar:22.3, org.geotools:gt-referencing:jar:22.3, org.geotools:gt-epsg-hsql:jar:22.3, org.geotools:gt-epsg-extension:jar:22.3, org.geotools:gt-geojson:jar:22.3, org.geotools:gt-render:jar:22.3, org.geotools:gt-swing:jar:22.3, org.geotools:gt-brewer:jar:22.3, org.geotools:gt-geopkg:jar:22.3: Failure to find org.geotools:gt-main:jar:22.3 in http://download.osgeo.org/webdav/geotools/ was cached in the local repository, resolution will not be reattempted until the update interval of osgeo has elapsed or updates are forced

Btw, your docs seem to be outdated, the root of the project no longer contains you pom.xml. (I also tried installing the project version at commit b98dc243a789e34dafb047e480de35d401a22cf5, just in case. Same error).

Cheers!

java.lang.NullPointerException at init

I've installed and started Tomcat 9 and deployed the war and the folder of searoute.
I'm not sure what I'm doing wrong in this deploy but I see this exception when the page is calling http://localhost:8080/searoute/seaws?opos=5.3,43.3&dpos=121.8,31.2&res=20

What am I supposed to configure to correctly launch the app?
Thank you so much for your help!

<!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> Servlet.init() for servlet [searoute] threw exception</p><p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b></p><pre>javax.servlet.ServletException: Servlet.init() for servlet [searoute] threw exception
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:745)
</pre><p><b>Root Cause</b></p><pre>java.lang.NullPointerException
	eu.europa.ec.eurostat.searoute.SeaRouting.&lt;init&gt;(SeaRouting.java:77)
	eu.europa.ec.eurostat.searoute.SeaRouting.&lt;init&gt;(SeaRouting.java:55)
	eu.europa.ec.eurostat.searoute.SeaRouting.&lt;init&gt;(SeaRouting.java:54)
	eu.europa.ec.eurostat.searoute.SeaRouteWS.init(SeaRouteWS.java:84)
	javax.servlet.GenericServlet.init(GenericServlet.java:158)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:745)
</pre><p><b>Note</b> The full stack trace of the root cause is available in the server logs.</p><hr class="line" /><h3>Apache Tomcat/9.0.14</h3></body></html>

Document dToKM and dFromKM

These are the distances between the origin/destination position and the closest node of the network. It indicates the approximation.

Maven dependency issue

Hello,
Thanks for sharing this great work,
I am trying to make it work on eclipse but I get an error while adding the dependency to the pom.xml file. The mvn clean install worked properly but once I get on eclipse, the build fails.

Here is the error message I get:
[INFO] Building total 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] Downloading from : http://central.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.common/maven-metadata.xml [INFO] Downloading from : https://repo.boundlessgeo.com/main/org/eclipse/emf/org.eclipse.emf.common/maven-metadata.xml [WARNING] Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to central.maven.org (http://central.maven.org/maven2): central.maven.org [WARNING] Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to boundless (https://repo.boundlessgeo.com/main/): repo.boundlessgeo.com [INFO] Downloading from : https://repo.boundlessgeo.com/main/org/eclipse/emf/org.eclipse.emf.ecore/maven-metadata.xml [INFO] Downloading from : http://central.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.ecore/maven-metadata.xml [WARNING] Could not transfer metadata org.eclipse.emf:org.eclipse.emf.ecore/maven-metadata.xml from/to central.maven.org (http://central.maven.org/maven2): central.maven.org [WARNING] Could not transfer metadata org.eclipse.emf:org.eclipse.emf.ecore/maven-metadata.xml from/to boundless (https://repo.boundlessgeo.com/main/): repo.boundlessgeo.com [WARNING] Failure to transfer org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from http://central.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central.maven.org has elapsed or updates are forced. Original error: Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to central.maven.org (http://central.maven.org/maven2): central.maven.org [WARNING] Failure to transfer org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from https://repo.boundlessgeo.com/main/ was cached in the local repository, resolution will not be reattempted until the update interval of boundless has elapsed or updates are forced. Original error: Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to boundless (https://repo.boundlessgeo.com/main/): repo.boundlessgeo.com [WARNING] Failure to transfer org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from http://central.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central.maven.org has elapsed or updates are forced. Original error: Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to central.maven.org (http://central.maven.org/maven2): central.maven.org [WARNING] Failure to transfer org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from https://repo.boundlessgeo.com/main/ was cached in the local repository, resolution will not be reattempted until the update interval of boundless has elapsed or updates are forced. Original error: Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to boundless (https://repo.boundlessgeo.com/main/): repo.boundlessgeo.com [WARNING] Failure to transfer org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from http://central.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central.maven.org has elapsed or updates are forced. Original error: Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to central.maven.org (http://central.maven.org/maven2): central.maven.org [WARNING] Failure to transfer org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from https://repo.boundlessgeo.com/main/ was cached in the local repository, resolution will not be reattempted until the update interval of boundless has elapsed or updates are forced. Original error: Could not transfer metadata org.eclipse.emf:org.eclipse.emf.common/maven-metadata.xml from/to boundless (https://repo.boundlessgeo.com/main/): repo.boundlessgeo.com [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.347 s [INFO] Finished at: 2020-04-22T00:15:00+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project total: Could not resolve dependencies for project dist:total:jar:0.0.1-SNAPSHOT: Failure to find eu.europa.ec.eurostat:searoute:jar:1.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.

Thanks a lot if by any chance you can help me with this issue,

Unable to run in tomcat : java.util.MissingResourceException

I followed all the instruction to build Searoutes with maven - and mvn clean install as well as the mvn clean package ran through successfully and produced the searoute-war.war file. I used Maven 3.6.3 and JDK 9.0.4, then deployed to Tomcat 10.0.2

All went well, and I get the API description ("Maritime route estimation..") up at

http://localhost:8080/searoute-war

But when I try to test the API with

http://localhost:8080/searoute-war/seaws?opos=5.3,43.3&dpos=121.8,31.2

I get this error:

HTTP Status 500 – Internal Server Error

Type Exception Report

Message Error instantiating servlet class [eu.europa.ec.eurostat.searoute.SeaRouteWS]

Root Cause

java.util.MissingResourceException: Can't find bundle for base name javax.servlet.LocalStrings, locale en
	java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2045)
	java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1679)
	java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1583)
	java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1546)
	java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:838)
	javax.servlet.GenericServlet.<clinit>(GenericServlet.java:95)

Any suggestions what would cause this? I found a hint somewhere that said to include this in the pom.xml file:

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.1.0</version>
</dependency>

But that didn't seem to make any difference after I re-built the war file.

Land intersection

Specify a land mass geometry to avoit maritime network intersects it.

How to build a marnet gkpg file

I am looking to build a custom gkpg file that I can use to give routes that do not go over headlands or over hazards. I am very happy to share my results with others that wish to use it as it will give a more precise routing. I am however completely lost as to how to build these files within Java. I have built the routes in QGIS and have detailed routes available, I need to get these to work inside of searoute. Can you give detailed instructions or somewhere I can read up on how to do this to enable me. Thanks.

exception at finer resolutions

I'm getting
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.locationtech.jts.geom.Geometry.getGeometryType()" because "g" is null
for all resolutions (50, 20) under 100. For 100 it correctly saves the output.
My command is

C:\FreightProj2020\code\searoute-2.1>jdk-15.0.1\bin\java -jar searoute.jar -i  routes\real_routes_2020-12-19_MR1.csv -res 100 -panama 1 -suez 1 -o routes\real_routes_2020-12-19_MR1.geojson
Build maritime network (resolution: 100km)...
2021-01-14 19:06:22 INFO  ENGINE:-1 - dataFileCache open start
Compute maritime routes (nb: 217)...
Save...

C:\FreightProj2020\code\searoute-2.1>jdk-15.0.1\bin\java -jar searoute.jar -i  routes\real_routes_2020-12-19_MR1.csv -res 20 -panama 1 -suez 1 -o routes\real_routes_2020-12-19_MR1.geojson
Build maritime network (resolution: 20km)...
2021-01-14 19:06:38 INFO  ENGINE:-1 - dataFileCache open start
Compute maritime routes (nb: 217)...
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.locationtech.jts.geom.Geometry.getGeometryType()" because "g" is null
        at eu.europa.ec.eurostat.searoute.GeoDistanceUtil.getLengthGeoKM(GeoDistanceUtil.java:37)
        at eu.europa.ec.eurostat.searoute.SeaRouteJarMain.main(SeaRouteJarMain.java:152)

Is it a bug or a wrong usage (but where in the latter case?)

Piracy area

The 'antipiracy routing' option may need to be disabled to access ports in the piracy area.

Releases and changelog

Is there a place where I can find every releases and see a changelog ?

In GH there is a v1.0 release associated with a tag and in master I see a v2.1, I'm confused about which version should be used.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.