Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have huge datasets on PostGIS. For example building table includes more than 100k features in POLYGON geometry. When i want to get all data in QGIS(2.1) or other GIS softwares by using direct DB connection i wait about 30 sec. But if use WFS connection (Geoserver) it takes more time (dont try)... In a webgis project (using openlayers) people down want to wait in front of the screen. And I think Openlayers cant handle with that huge data... So i use to serve data by using WMS. Its really to fast and maybe later i try tilecaching etc... Ok everything is so far so good. But I want to edit features (only insert maybe delete no update) on the browser. I have cheched Openlayers examples for WFS-T. These examples load all data to by WFS. I dont want loading data just inserting new features by drawing and than clicking save button. So new features sending to geoserver...

I tried with Openlayers WFS-transaction example link. Firstly modified data map.addlayers([wfs,gpyh]); to map.addlayers([gpyh]); to load only googlemaps baselayer. There is no error during drawing but when saving i get error. I says is null  

var local =;

What do you advise me when working with big layers.Is my way corretc. How can i handle with this issue? My javascript knowledge is limitied.


Some info about the system which i want to build:

I want to serve buildings, roads, boundary etc. layers to people. Not only showing but also editing capabilities it should have.


I dont want to load features to OpenLayers, i just want to draw new features and put them into database. And I use WMS for serving layers.

I use OpenLayers lib in client side (apprentice in javascript).

The data is stored in Postgis. But i can use Spatialite.

Geoserver for WMS and WFS service.

I am not bad in Python and PHP. Maybe i can use FeatureServer. Also i can serve feature data with PHP or Python.

share|improve this question

closed as unclear what you're asking by BradHards, Paul, PolyGeo, Brad Nesom, Curlew Oct 20 '13 at 11:19

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.

100K isn't a lot of features in a database, and presumably you won't be able to show all of those on the screen at once. Do you have good indexing? This question is pretty confusing, so I think you should consider editing it to show the real code you are using, and remove the parts that aren't relevant to the question you are trying to ask. Is this about WFS, WMS, Openlayers, QGIS or what? If you can't explain the question, we can't provide an answer. – BradHards Oct 19 '13 at 23:18
There is a good Meta Q&A on What makes a good Question? that is well worth reviewing as you try to revise your question to become Answer-able. I would start with its title because once that has a question mark on it adding focus to the rest of the Question should follow. – PolyGeo Oct 20 '13 at 22:22
I feel that even with the edit, the question is confusing. Firstly, what are you asking? DO you want help with the general architecture, or with the specific error that you are getting? Where are you stuck? what have you tried? – Devdatta Tengshe Oct 21 '13 at 3:07

if you only want to insert features, you can directly do that in database. With openlayers draw the feature then convert it to WKT.

This code will output the WKT geometry of the added feature in an input field with id geometry. Then you can use php to make connection to database and insert it there.

 //Draw Feature control
                var draw = new OpenLayers.Control.DrawFeature(
                        vector,         //layer
                        OpenLayers.Handler.Path, //Handler
                        {       multi:true,
                                type: OpenLayers.Control.TYPE_TOGGLE,
                                //handlerOptions : {maxVertices: 5}
      "featureadded",'' , FeatureAdded);
                function FeatureAdded(object){ 
                        //alert('feature added');
                        var oFeature = object.feature; 
                        oFeature.state = OpenLayers.State.INSERT;  
                        document.getElementById('geometry').value = oFeature.geometry;
share|improve this answer

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