gregseb / geospatial

An adaption of Affinity Bridges Spatial module using geocoder.
GNU General Public License v3.0
2 stars 1 forks source link

Outdated ogr2ogr doesn't implement /vsistdout/ to StdOut #1

Open kblattmann opened 11 years ago

kblattmann commented 11 years ago

When I upload this shapefile link, I receive the following error on saving the node:

Fatal error: Call to a member function getY() on a non-object in /home/pikadevc/public_html/dev/free/sites/all/modules/geofield/geofield.module on line 239

If I recall correctly this is due to the absence/presence of a Z component of the shapfile.

gregseb commented 11 years ago

That looks to me like it's failing to process the shapefile outright for some reason. the reasons that come to mind are either ogr2ogr is actually not being found, the shapefile is invalid for some reason, or something's changed since I wrote this code.

What happens if you run the following from a terminal on the server your site is running on?: which ogr2ogr

I'll look into the other two possibilities and get back to you as soon as I can.

gregseb commented 11 years ago

The shapefile appears to be valid... so it's problems one, three, or mystery problem.

gregseb commented 11 years ago

the code runs fine for me, so we're going to have to trouble shoot your system.

Changed issue type to question.

kblattmann commented 11 years ago

Thanks Greg. I get this when running from the terminal:

[~/www/dev/free]# which ogr2ogr /usr/bin/ogr2ogr

gregseb commented 11 years ago

For information:

Spoke with Karl on skype and found that the version of ogr2ogr on the server hosting his site doesn't interpret /vsistdout/ as a sign to write output to StdOut and instead throws an error.

gregseb commented 11 years ago

long term solution is to see if the shared hosting guys will update gdal (dtarc says 1.8+ is required). In the mean time I'll spin out an lternative ogr2ogr version as a temperary solution.

Changed title of issue to: Outdated ogr2ogr doesn't implement /vsistdout/ to StdOut

gregseb commented 11 years ago

Pushed a branch to GJdan/ogr2ogr.git called tmpdir. It will write to the temp directory instead of StdOut and should work on your site while the shared hosting guys still keep the old gdal library around.

git clone --branch=tmpdir git@github.com/GJdan/ogr2ogr.git

kblattmann commented 11 years ago

So here is what my site is running: They are CentOS 5.x and 6.x (but I'm fuzzy on which one we had this problem, but I think the 6.x). Both are x64