-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shapefile import via geotools #616
Conversation
@@ -22,6 +22,7 @@ | |||
<netbeans.hint.license>apache20</netbeans.hint.license> | |||
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format> | |||
<builddate>${maven.build.timestamp}</builddate> | |||
<geotools.version>10.8</geotools.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use a currently supported version of Geotools, eg. 14.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had used, mvn clean test verify
that seemed to use java 1.6 hence had to use previous version.
Here tests are run against 1.7 and 1.8 , so will update to newer version.
Hi Vikas, thanks for this PR! Shapefiles are very valuable, especially to import or handle proprietary data. Is there a special format expected or certain attributes? E.g. how is the speed value per vehicle guessed? Or will it just import the topology and handling other attributes will be done elsewhere? In order to integrate this we need to do some work like #450. This is already planned and creates a separate Recently I had the pleasure with playing with shp files on my own (maybe I'll blog about this) and geotools is just too huge to be included in the normal distribution or even in core. But after these refactorings we should be able to put the geotools stuff into a separate module like The unit tests looks good. Additionally we need a stronger validation here e.g. ensuring that certain networks exists and the location lookup works, plus a simple Dijkstra run.
Do you mean |
Yes ! ./graphhopper.sh web - asia_india.shp |
I have abstracted out the logic to handle shape file handling and building graph. Vehicle speeds are not explicitly calculated. For now just using 'maxspeed' in shape file, if not present an Average Speed is used. This will need improvements, which will again depend on the "schema of shape file". |
Interesting implementation and useful too for proprietary data.
👍 |
@karussell there is gc overhead in one build, should increase the maven memory ? |
Ah, okay! How do you determine if something is a junction vs. a bridge?
Perfect!
Hmmh, what do you mean here? I was asking about memory usage just because of comparison to OSM importer. Regarding the refactoring: I'll try to implement #450 in the next weeks and then it shouldn't take much to change this PR to be merged. What do you think? |
Please check attached log for asia_india.shp , for zip of ~300 MBs with RAM of 1G took about 5-6 minutes. The memory usage I was taking about was in the 'Tarvis CI build' , one of its test instance is failing due to maven OOM. I will take at look at #450 and other issues and see how much is to be done (refactoring,redesign, etc for ShapeFileReader module) and commit as per availability. |
Just to let you know: this is not forgotten :) As this is important work I'm working on #450 in a new branch and will provide this soonish as a new pull request. Then this work needs to be refactored (into a new maven module) to integrate it better in the new structure. |
Great , changes looks good. Will try to integrate with it. Should be done by end of July. |
Thanks a lot for the feedback! Will then try to integrate this in the next weeks. |
BTW: Merged the changes so this one here could be better separated too |
@@ -22,6 +22,7 @@ | |||
<netbeans.hint.license>apache20</netbeans.hint.license> | |||
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format> | |||
<builddate>${maven.build.timestamp}</builddate> | |||
<geotools.version>13.2</geotools.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will want to update this to the latest maintainance release (14.x). The current stable (15.x requires java 8)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this won't be in the core we can use java 8 like we do with the web module too.
Adaptions to this PR done in #874 |
Shape file reader :
Run it via : ./graphhopper.sh web - asia_india.shp