Re: [gdal-dev] ogr2ogr to convert one CSV row of MULTIPOLYGON to many CSV rows of POLYGON

2019-10-14 Thread Simon Eves
Thanks for that, Jukka, and sorry for the vagueness of my original post... I was under a very tight deadline to finish something on Thursday before being away for a long weekend. I got the same result as you without the -lco option. The output file just contained the same MULTIPOLYGONS, although t

Re: [gdal-dev] ogr2ogr to convert one CSV row of MULTIPOLYGON to many CSV rows of POLYGON

2019-10-11 Thread jratike80
Here is a partial solution or workaround Take this as input id,wkt 1,"MULTIPOLYGON ((( 296 643, 623 660, 531 484, 349 507, 296 643 )), (( 681 635, 895 588, 632 432, 681 635 )))" Run this ogr2ogr -f csv -lco geometry=as_wkt -explodecollections wkt_expl.csv wkt.csv Get this result WKT,id,wkt "P

Re: [gdal-dev] ogr2ogr to convert one CSV row of MULTIPOLYGON to many CSV rows of POLYGON

2019-10-11 Thread jratike80
Hi, Please provide some test data and explain in details what did you try. Spending some time for making an answerable question would certainly be the best way for getting fast and usable help. -Jukka Rahkonen- Simon Eves wrote > Dear List, > > I need to do this super-urgently > > I am tryin

Re: [gdal-dev] ogr2ogr to convert one CSV row of MULTIPOLYGON to many CSV rows of POLYGON

2019-10-10 Thread Alan Snow
You could try geopandas. It has an explode method that looks like it does what you want. https://github.com/geopandas/geopandas/blob/a3170ecbf76fc91188cd67c93c123c5fa27e9c95/geopandas/geodataframe.py#L659 On Thu, Oct 10, 2019, 6:17 PM Simon Eves wrote: > Dear List, > > I need to do this super-ur