Select to view content in your preferred language

Convert OpenStreetMap Schemas to SDE

575
2
05-08-2013 07:50 AM
NicolasCaspari
Emerging Contributor
I am trying to find a way to store OSM Extracts (or possibly the planetfile) in a PostgreSQL database, keep it up to date with diff files and then process the data further with ArcGIS (e.g. Geocoding, Mapping).

The best idea I have come up with so far is to import the osm data into the database with common OSM tools like Osmosis or osm2pgsql. My problem is, that those tools create different schemas than SDE.

Has anyone ever tried this before, or a good idea on how to convert between the schemas? I'm open to any comments or suggestions.
0 Kudos
2 Replies
NicolasCaspari
Emerging Contributor
Update: I imported the OSM files with osm2pgsql and tried to register the OSM tables as feature classes, but I am stuck with building up the connection via SDE command line tools (from ArcGIS 10.1 SP1 32bit to PostgreSQL 9.1 64bit on Windows).

sdelayer -o register -l planet_osm_point,way -e p+ -C osm_id,SDE -t PG_GEOMETRY -R 3857 -i sde:postgresql:localhost;PGPORT=5434 -s localhost -D arc_osm -u sde 


I get the follwing error message "Cannot connect to database because the database client software failed to load. Be sure the database client software is installed and configured correctly (-324)".

I placed the correct client libraries in my ArcGIS directory and I can connect via ArcCatalog. The PostgreSQL path is set in the PATH dir. Do I have to set any other path dir under PATH?

I also placed the client libraries under C:\PostgreSQL\9.1\lib and in the SDEHOME path. No success.
0 Kudos
VinceAngelo
Esri Esteemed Contributor
You're mixing apples with oranges here -- the 'sdelayer' command is a 64-bit binary, so it
needs the 64-bit PG client libraries, not the 32-bit ones required for Desktop.

BTW: You should NEVER load or register spatial data as the SDE user.  Best practice is to
create a different login user (and a corresponding schema) to own spatial tables, and yet
another user to access the data in applications (granted needed access though a role).

- V
0 Kudos