Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm struggled with the following problem: I'd like to import an Openlayer 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

Many thanks and kind regards,

Rafa

share|improve this question
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

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
Thanks for your reply, it resolved my question and even more! –  Rafa Feb 19 '13 at 9:43
1  
@Rafa I'm glad to help you out. Please consider marking this answer as accepted. –  Devdatta Tengshe Feb 19 '13 at 9:59
1  
Thanks @underdark for the article. Excelent trick. –  Magno C Feb 19 '13 at 11:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.