2

When I run select pgr_createTopology('public.roads', 0.0001, 'geom', 'id');, all I get is "FAIL". The roads table has these fields:

id (integer)
source (integer)
target (integer)
geom (geometry LineStringM,3006)

What am I missing? I have been unable to find a list of requirements for the network table, which I create using FME. I use pgRouting 2.2.2.

2 Answers 2

5

The geometrytype should be LineString, not LineStringM.

Try changing your geom column to LineString with this:

ALTER TABLE public.roads 
  ALTER COLUMN geom TYPE geometry(LineString,3006)
  USING ST_Force2D(geom);
2
  • Ah, yes, that helped. The query now works. Thank you.
    – johnrobot
    Commented Aug 22, 2017 at 7:51
  • should check as accepted answer.
    – Regina Obe
    Commented Aug 22, 2017 at 23:53
-1

Debes tener errores topológicos, verifica que no tengas líneas duplicadas, arcos, etc.. debes tener una capa super limpia topológicamente hablando.


English translation:

You must have topological errors, verify that you do not have duplicate lines, arcs, etc. You must have a super clean layer topologically speaking.

1
  • GIS SE is an English-language forum. Please translate non-English text in answers, much as I have done with Google Translate above.
    – Vince
    Commented Nov 5, 2020 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.