1

After some days I was finally able to import OSM data to a PostgreSQL database and connect it with ArcGIS 10.2.2

I can load every piece I want by simple clicking "Add data ..." however a SQL query layer always delivers the complete data rather than selecting the rows.

Here is what I set up first:

enter image description here

And that's what remains after ArcGIS finished loading the layer:

enter image description here

I don't understand why it keeps transforming the query expression.

In pgAdmin it shows just fine:

enter image description here

I am really clueless in this matter and ArcGIS is just so slow loading all the data over and over again (instead of QGIS, where the query is no problem).

closed as unclear what you're asking by PolyGeo Jan 15 '17 at 0:28

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Based on your screenshots, something appears to be missing. For one, I would think you need double quotes around the field name you're querying - ie, "landuse". Following that, if you've constructed the query rather than typing it in, your screenshots aren't showing what you've selected. If you reference the help page, I note that if you select a table on the left, the box on the right should show a list of available fields and data types. – Chris W Dec 7 '14 at 19:23
  • Thanks for getting back to me Chris. I have typed in the SQL query so that's why you cannot see the tables on the right side of planet_osm_polygon. For now I tried the double quotes but ArcGIS still resists to accept the SQL expression and rather select everything again. Don't have any clue why ... – Nathan Dec 7 '14 at 20:03
  • Then I suspect it might be related to this question: gis.stackexchange.com/questions/94759/… – Chris W Dec 7 '14 at 20:08
  • Hmm sounds familiar, however for that OID I generated the arcgis_ID (consecutive BIGSERIAL than tranformed it to varchar in PostgreSQL as ArcGIS cannot use BIGSERIAL as OID just for display) and set it as primary key. After that ArcGIS never complained about a unique identifier anymore. – Nathan Dec 7 '14 at 20:36
  • 1
    I know this is not an answer to your question, but have you ever tried to use ESRI "ArcGIS Editor for OpenstreetMap"? It comes with an option to load OSM files, and create either a File Geodatabase, or an Enterprise Geodatabase like PostgreSQL, and fill it with the data. The neat thing about this is, that ESRI by default included an option to store all tagging information, like in PostgreSQL hstore. It is stored in a special database field maintained by the extension. This gives you good access to all tags, although admittedly you need to extract them first before being able to use it in SQL. – Marco_B Dec 8 '14 at 17:57