[gdal-dev] Reading shapefile PRJ failing
Even Rouault
even.rouault at mines-paris.org
Sat Jul 12 12:29:41 PDT 2014
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
More information about the gdal-dev
mailing list