<div dir="ltr">As i said in my answer to the question the GeoJSON is invalid due to the ring order, but I'm not sure if OGR checks for that.<div><br></div><div>Ian</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 September 2017 at 07:38, Rahkonen Jukka (MML) <span dir="ltr"><<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@maanmittauslaitos.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I was thinking about this question on gis.stackexchange <a href="https://gis.stackexchange.com/questions/254536/how-to-convert-txt-containing-two-columns-id-and-geojson-geometry" rel="noreferrer" target="_blank">https://gis.stackexchange.com/<wbr>questions/254536/how-to-<wbr>convert-txt-containing-two-<wbr>columns-id-and-geojson-<wbr>geometry</a><br>
<br>
I copy-pasted the CSV example and edited it to use semicolon as field separator. Then I read <a href="http://www.gdal.org/drv_csv.html" rel="noreferrer" target="_blank">http://www.gdal.org/drv_csv.<wbr>html</a> and had a try with ogrinfo<br>
<br>
ogrinfo geojson_csv.csv -al -oo GEOM_POSSIBLE_NAMES=geoJSON<br>
INFO: Open of `geojson_csv.csv'<br>
      using driver `CSV' successful.<br>
<br>
Layer name: geojson_csv<br>
Geometry: Unknown (any)<br>
Feature Count: 1<br>
Layer SRS WKT:<br>
(unknown)<br>
Geometry Column = geoJSON<br>
Id: String (0.0)<br>
geoJSON: String (0.0)<br>
OGRFeature(geojson_csv):1<br>
  Id (String) = 49518<br>
  geoJSON (String) = {type:Polygon,coordinates:[[[<wbr>29.9596,-2.3272],[29.9189,-2.7<br>
9],[29.3706,-2.8401],[29.1497,<wbr>-2.5917],[29.0405,-2.7447],[<wbr>28.8619,-2.5309],[29.1<br>
1,-1.8602],[29.3616,-1.5092],[<wbr>29.8237,-1.3089],[29.9149,-1.<wbr>4825],[30.0524,-1.431<br>
,[30.8394,-1.6514],[30.8567,-<wbr>2.3151],[30.1356,-2.4382],[29.<wbr>9596,-2.3272]]]}<br>
<br>
The GeoJSON geometry is not recognized but ogrinfo converts it into a string, with double quetes removed. Is there something wrong in the CSV or in my syntax?<br>
<br>
-Jukka Rahkonen-<br>
______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/gdal-dev</a></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Ian Turton<br></div>
</div>