Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've imported England shp file of roads to mssql using OSM2MSSQL and I've noticed that the same road has couple of records with same Id but different geographic (probably it was segmented).

Is there a way to convert these records to one record with entire geographic data? I want to have unique Id in my streets table instead of having two tables, one with unique Id and one with geographic data.

share|improve this question
How did you import OSM into MSSQL? The import script most likely did the splitting. If you don't want the roads split it's better to look for a different import script than to try to undo the splitting which might be very error-prone. – underdark Dec 16 '12 at 11:15
I've used OSM2MSSQL. – Alophind Dec 16 '12 at 21:39
st_linemerge(the_geom) in PostGIS , But it seems that MSSSQL dosn't have it. QGIS with MSSQL database connection handles linemerge. ANd Do you know why you have segment on road? Usually it becasue routing want to have nodes on real intersections or some attribute changes on way. – simplexio Dec 17 '12 at 8:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.