Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Problem with converting shapefiles.

Hello,

 Thank you really much for your answers!
Using Jacob Erdman's workarround I was able to solve my problem and it's good enough for now. I tried --shapefile.guess-projection and not much change and jakob's workaround
 still work.
Now my network is converted to net.xml and can be opened in netedit. The problem now is that my network is not converted right and some parts (edges) are missing. Attached you can find an image that shows a sample of the problem. On the left my network is opened on netedit and on the left how it is should look like (opened the shapefile in QGIS). I can not fix the road network manually because my road network is too big and would take a very long time.

Thank you,
Tom

P.S what would be the best way to populate my network to create a simple random simulation?

Quoting Harald Schaefer <HaraldSchaefer@xxxxxxxxxxx>:

Hello Tom,

I'm not the expert in qcgis import.
It would help to analyze your problem, if you attach the files of your
minimal problem as a zip file.
One idea: have you tried the option --shapefile.guess-projection
<http://shapefile.guess-projection> ?

Regards Harald



--- Original-Nachricht ---
Von: cchadj01@xxxxxxxxxxxx
Betreff: Re: [sumo-user] Problem with converting shapefiles.
Datum: 04.10.2018, 9:20 Uhr
An: Sumo project User discussions





Hello,
I would like to bring this problem up because it was not answered yet.
I would really appreciate some help if that is possible.
Thank you,
Tom

Quoting cchadj01@xxxxxxxxxxxx <mailto:cchadj01@xxxxxxxxxxxx> :

Hello,
I want to convert a shapefile to .net.xml using NETCONVERTER.
My shapefile prefix is output-shapefile.
You can see my dbf fields that are used in the image attached. As
your site states at http://sumo.dlr.de/wiki/Networks/Import/ArcView
<http://sumo.dlr.de/wiki/Networks/Import/ArcView>
I have the minimal three fields required in order for the conversion
to take place. I have attached an excel screenshot named
minimal-problem-dbf.png <http://minimal-problem-dbf.png>

I used the shapefile in QGcis in order to check if the edges are
connected and if the node ids are correct. I have attached two pngs
showing two consecutive edges in order to check if they share a
common node which is correct. (The images are
qgis-first-selection.png <http://qgis-first-selection.png> and
qgis-second-edge-selection.png <http://qgis-second-edge-selection.png> )

After checking the correctness of my shapefile I used the command:
netconvert -v --shapefile-prefix output-shapefile -o net.net.xml
<http://net.net.xml>
--shapefile.from-id <http://shapefile.from-id> from_id --shapefile.to-id
<http://shapefile.to-id> to_id
--shapefile.street-id <http://shapefile.street-id> edge_id --
shapefile.use-defaults-on-failure
<http://shapefile.use-defaults-on-failure>

The operation runs successfully but with a lot of warnings. The
netconvert output is attached below as netconvert-output.png
<http://netconvert-output.png> .

When I try to open the network with neteditor I get the error
`Error: Could not build projection!` and then it fails to build the
network.

I can't see what the problem is. Any help would be appreciated.

Thank you,
Tom


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx <mailto:sumo-user@xxxxxxxxxxx>
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user
<https://dev.eclipse.org/mailman/listinfo/sumo-user>




Back to the top