[gdal-dev] RE : Re: Reading shapefile PRJ failing
MITANCHEY Richard - CEREMA/DTecTV/ESI/GNSI
Richard.Mitanchey at cerema.fr
Mon Jul 14 03:29:46 PDT 2014
Envoyé depuis un mobile Samsung
-------- Message d'origine --------
De : "> Even Rouault (par Internet, dépôt gdal-dev-bounces at lists.osgeo.org)" <even.rouault at mines-paris.org>
Date : 12/07/2014 9:29 PM (GMT+01:00)
A : Brian McCormick <mccorb at cox.net>
Cc : gdal-dev at lists.osgeo.org
Objet : Re: [gdal-dev] Reading shapefile PRJ failing
Brian,
I've added support in GDAL trunk for those files. I could see that at least
another GIS software supported them, so...
Even
> Even,
>
> I am not sure what generated it. It seems as though I have run across a lot
> of files that have a BOM that have thrown me in recent years. Most seem to
> have some relation to using Microsoft .net framework tools that have
> Unicode support built in from the ground up. But I am really not sure and
> that is just a guess. Some text editors seem to do it also. I just know
> that it has caused me all sorts of grief over the years with all sorts of
> software I have both used and written.
>
> Here is what I have used in the past for the BOM list although the EF BB BF
> is by far the most common I have seen...
> http://en.wikipedia.org/wiki/Byte_order_mark
>
> Anyway I have attached a shapefile that has a bom marker in the prj file.
> Not sure yet about the other files...if they have any similar anomalies or
> exactly what was used to gen the shapefile. I haven't looked at the shp,
> shx or dbf file yet...
>
> Thanks,
>
>
> Brian S. McCormick
> mccorb at cox.net
> 918-749-5453
>
>
>
> -----Original Message-----
> From: Even Rouault [mailto:even.rouault at mines-paris.org]
> Sent: Saturday, July 12, 2014 12:32 PM
> To: mccorb
> Subject: Re: [gdal-dev] Reading shapefile PRJ failing
>
> Le samedi 12 juillet 2014 18:45:24, vous avez écrit :
> > So I have tracked this down to the fact that the PRJ files that I have
> > been given to use have a BOM of 0xEF 0xBB 0xBF for the first three
> > bytes of the file.
> >
> > When I use the shapefiles that have these byte order markers the Layer
> > class method getSpatialRef() (java JNI bindings) returns null. I am
> > guessing that the PRJ file is being opened in binary mode instead of
> > text mode possibly?
> >
> > Regardless, is there any setting I can make to coerce the file
> > opener/reader into ignoring the BOM when grabbing the WKT from the PRJ
> > file?
>
> Not really. GDAL should be enhanced to support such a file. Do you have a
> sample of such a .prj ? Do you know which software has generated it ?
> That's the first time I hear about .prj with BOM marker.
>
> > thanks
> >
> >
> >
> > --
> > View this message in context:
> > http://osgeo-org.1560.x6.nabble.com/Reading-shapefile-PRJ-failing-tp51
> > 5077 8.html Sent from the GDAL - Dev mailing list archive at
> > Nabble.com.
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> Geospatial professional services
> http://even.rouault.free.fr/services.html
--
Geospatial professional services
http://even.rouault.free.fr/services.html
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140714/ea35bfdb/attachment.html>
More information about the gdal-dev
mailing list