Chiru / FIWARE-POIDataProvider

FIWARE Points of Interest Data Provider Generic Enabler - stores and retrieves data by geographical location
http://catalogue.fiware.org/enablers/poi-data-provider
4 stars 8 forks source link

Fix incompatible columns. #11

Closed ck-1 closed 8 years ago

ck-1 commented 8 years ago

The import of the OSM POIs fails because of some incompatible columns in the fw_core table.

ariokkon commented 8 years ago

Thank you. It seems that OSM import was left untested after database changes. I'll check and merge.

ariokkon commented 8 years ago

It seems that the suggested correction sets "amenity" to the category of each POI.

    "0df16fc3-64cb-4347-9a82-eff8fe0d42d7": {
      "fw_core": {
        "location": {
          "wgs84": {
            "latitude": 65.011145592173,
            "longitude": 25.464870615194
          }
        },
        "categories": ["amenity"],
        "source": {
          "name": "OpenStreetMap",
          "website": "http://www.openstreetmap.org",
          "license": "http://www.openstreetmap.org/copyright"
        },
        "name": {
          "": "Autotori/Scandic"
        }
      }
    }

I need to do some more research.

ariokkon commented 8 years ago

It seems that the import works better, if the line 3 of tools/poi_osm_import/insert_fw_core_from_osm.sql is (update the timestamp, anyway)

   SELECT uuid_generate_v4(), osm_id, 1410777181, ARRAY[amenity], Geography(ST_Transform(way,4326)), 'OpenStreetMap', 'http://www.openstreetmap.org', 'http://www.openstreetmap.org/copyright'
ariokkon commented 8 years ago

The request merged manually with corrections.