wavded / ogre

ogr2ogr geojson-focused web client
http://ogre.adc4gis.com
MIT License
266 stars 78 forks source link

{ errors: [ "Error: spawn ENOENT" ] } #38

Closed andrewjtimmons closed 9 years ago

andrewjtimmons commented 9 years ago

Hello,

Thank you for making this! It is awesome.

I am trying to convert a 130mb shapefile to JSON.

I npm installed ogre

I installed gdal with these instructions, including the set path step. https://sites.google.com/site/eospansite/installinggdalonmacosx

I read the other issue about enoent and path.

When I try to convert on localhost with a timeout of 1500000 I almost immediately get the error { errors: [ "Error: spawn ENOENT" ] }

Do you have any advice on what I should do?

Best, Andy

wavded commented 9 years ago

spawn ENOENT would indicate that it couldn't find the ogr2ogr command in your PATH, does it need to be added?

andrewjtimmons commented 9 years ago

Hey Mark,

Thanks for the fast reply.

This page https://sites.google.com/site/eospansite/installinggdalonmacosx had this step and I put it in the command line.
export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH

Is that the proper path or should I be using something else?

Cheers

wavded commented 9 years ago

Hmm.. I typically use Docker when running on the Mac. When you type ogr2ogr on the command line is the command found? If not, locate the command in the project and add that to your PATH.

andrewjtimmons commented 9 years ago

ogr2ogr produces this $ ogr2ogr Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-select field_list] [-where restricted_where] [-progress] [-sql ] [-dialect dialect] [-preserve_fid] [-fid FID] [-spat xmin ymin xmax ymax] [-geomfield field] [-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def] [-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...] dst_datasource_name src_datasource_name [-lco NAME=VALUE] [-nln name] [-nlt type] [-dim 2|3|layer_dim] [layer [layer ...]]

So it seems to be there?

wavded commented 9 years ago

OK, that looks good, donno what's going on then. How are you running ogre? Are you running it as a super user?

andrewjtimmons commented 9 years ago

I did ogre -p 3000 -t 1500000

I don't believe so. I can try running it with sudo when I get home later this evening.

I will try using a smaller shapefile that worked on your website interface as well just to ensure that my huge file is not somehow causing the issue.

andrewjtimmons commented 9 years ago

Sudo fixed the issue on the small file for connecting to the ogr2ogr PATH. Thanks!