[Imports] Using Rewritten ogr2osm
Paul Norman
penorman at mac.com
Mon Mar 5 02:32:52 UTC 2012
Your error is likely caused by the python you are running not having the
gdal-python bindings. Try running c:\python27\python and then typing import
gdal. If it responds with a >>> then gdal is working. If not, then the
python install you are running does not have the bindings. This can be
caused by multiple python installations, you may need to use the python
version that came with the osgeo tools.
If you are eventually planning to use ogr2osm to prepare data for import,
you will want to share the translations file in ogr2osm/translations/ that
you create when you do the required consultation with imports@ and the local
community.
From: RheinSkipper [mailto:rheinskipper1000 at gmx.de]
Sent: Sunday, March 04, 2012 1:50 PM
To: imports at openstreetmap.org
Subject: [Imports] Using Rewritten ogr2osm
Hello import experts,
I want to learn how to convert S57 objects from inland ENC nautical charts
to osm. I will not import anything to the osm database, yet. But I want to
merge some objects to my local osm extract an compile a map out of it.
Using ogr2ogr I was able to extract specific layers from S57 and convert
them to shape files. The produced shape files load well to mercaator or
gpsmapedit and look good.
Now I need to convert the shape files to osm. Having no deeper understanding
of python, I was unable to make tools like ogr2osm, shp-to-osm, shp2osm or
exallpoly work for me.
I tried to use the rewritten version of ogr2osm as follows:
set gdaldir=D:\ENC\gdal
SET
PATH=%gdaldir%\bin;%gdaldir%\bin\gdal\python\osgeo;%gdaldir%\bin\proj\apps;%
gdaldir%\bin\gdal\apps;%gdaldir%\bin\ms\apps;%gdaldir%\bin\gdal\csharp;%gdal
dir%\bin\ms\csharp;%gdaldir%\bin\curl;%PATH%
SET GDAL_DATA=%gdaldir%\bin\gdal-data
SET GDAL_DRIVER_PATH=%gdaldir%\bin\gdal\plugins
SET PYTHONPATH=%gdaldir%\bin\gdal\python\osgeo;%gdaldir%\bin\gdal\python
SET PROJ_LIB=%gdaldir%\bin\proj\SHARE
rem set s57_csv=%gdaldir%\bin\gdal-data
c:\python27\python ogr2osm\ogr2osm.py shp\fairwy.shp
But it only produces this errors:
Traceback (most recent call last):
File "ogr2osm\ogr2osm.py", line 52, in <module>
from osgeo import ogr
File "D:\ENC\gdal\bin\gdal\python\osgeo\__init__.py", line 21, in <module>
_gdal = swig_import_helper()
File "D:\ENC\gdal\bin\gdal\python\osgeo\__init__.py", line 17, in
swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
I used the All files in a single .zip package gdal version from here:
<http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1600-x64-gdal
-1-9-mapserver-6-0.zip>
http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1600-x64-gdal-
1-9-mapserver-6-0.zip
Can you give me a hint what I´m doing wrong?
https://wiki.openstreetmap.org/wiki/User:RheinSkipper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/imports/attachments/20120304/bb09c003/attachment.html>
More information about the Imports
mailing list