[gdal-dev] Reading shapefile PRJ failing

mccorb mccorb at cox.net
Sat Jul 12 12:44:30 PDT 2014


Evan,

 

Thank you so much. 

 

I’m fairly new to using GDAL/OGR. Will the fix appear in from the downloads page at http://www.gisinternals.com/sdk/ tomorrow? That is where we have been downloading from but not sure what the time lag is between those compiles and the trunk code you modified.

 

Again, thanks so much.

 

Brian

 

From: Even Rouault [via OSGeo.org] [mailto:ml-node+s1560n5150785h94 at n6.nabble.com] 
Sent: Saturday, July 12, 2014 2:31 PM
To: mccorb
Subject: Re: 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 
> [hidden email] 
> 918-749-5453 
> 
> 
> 
> -----Original Message----- 
> From: Even Rouault [mailto:[hidden email]] 
> 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 
> > [hidden email] 
> > 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 
[hidden email] 
http://lists.osgeo.org/mailman/listinfo/gdal-dev 

  _____  

If you reply to this email, your message will be added to the discussion below:

http://osgeo-org.1560.x6.nabble.com/Reading-shapefile-PRJ-failing-tp5150778p5150785.html 

To unsubscribe from Reading shapefile PRJ failing, click here <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5150778&code=bWNjb3JiQGNveC5uZXR8NTE1MDc3OHwtMTM1NTE0NTE2OQ==> .
 <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> NAML 





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Reading-shapefile-PRJ-failing-tp5150778p5150786.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140712/843afde3/attachment.html>


More information about the gdal-dev mailing list