I have successfully loaded a WFS layer from database and made changes to features and saved the layer by WFS-T.
Now I want to create a new feature layer and add that layer in my database. All the examples I see load the layer from database and then make changes to it or display it. I want to create a new layer and add some points, line etc. features to it and then save it in database.
I think I am not being clear as I didn't get any reply. Let me explain a bit more.
In want to create a new layer on database. See I can create layer in PostgreSQL and then configure geoserver to show that layer and then access that layer using open layers using WFS and make changes to the features and commit changes. This all I can do.
I want to create the layer in PostgreSql without accessing the database directly. I want to create new feature layer in open layers and then ask geoserver to create a layer in PostgreSQL. The layer is initially not in database. The feature layer in open layers is saved in PostgreSQL.
On Wed, Nov 20, 2013 at 11:48 AM, pankaj123
<[hidden email]> wrote:
> Please help me. I need this ASAP.
Using openlayers directly you can't do this:
You need to call from openlayers some server-side code (i.e. java or
c# or whatever you wanna use) that, in order:
1. enstablish a connection to postgres db
2. launch a series of sql commands that create a table, fields,
indices and so on
3. call the geoserver rest api and configure geoserver accordingly: