I'm struggled with the following problem: I'd like to import an OpenLayers layer to PostGIS in order to have the layer information for each grid point in a table. I know how to create a layer from PostGIS tables to OpenLayers using GeoServer... but not the inverse way.

Please any help would be extremely appreciated

  • 3
    What do you mean by OpenLayer layer? Where is the data coming from? Is it a WMS or WFS or some thing else? Without these details, it will not be possible to answer your question. – Devdatta Tengshe Feb 19 '13 at 8:41
  • Actually it is WMS layer, but I didn't knew it was important too. If so, which are the differences in any case? – Rafa Feb 19 '13 at 8:59

If your data source is in a vector format (like WFS, GeoJSON, KML etc) then you can use ogr2ogr to convert and import the data. Here is an article which shows how you can put data from a WFS service into your PostGIS database.

If your data source is a raster format (like WMS, tiles, GoogleMaps Layers, Imagery layers etc) then you cannot get information from that datasource into your database.

  • Thanks for your reply, it resolved my question and even more! – Rafa Feb 19 '13 at 9:43

Your Answer

