creating a new layer in database

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

creating a new layer in database

pankaj123
hii

I am new to this mailing list and need some help.

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.

Any help.....

Regards
Pankaj Bansal
Reply | Threaded
Open this post in threaded view
|

Re: creating a new layer in database

pankaj123
hii

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.

Please help me. I need this ASAP.


Thanks and Regards
Pankaj Bansal
Reply | Threaded
Open this post in threaded view
|

Re: creating a new layer in database

D_Guidi
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:
http://docs.geoserver.org/2.0.0/user/extensions/rest/index.html

not the easier thing to do

Diego Guidi
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: creating a new layer in database

Phil Scadden
In reply to this post by pankaj123
You need to show us some code.
Also, have you used the NET tab in firebug/chrome to see what OL is
trying to POST back to geoserver when you save? Is it a valid construct?

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: creating a new layer in database

Phil Scadden
In reply to this post by D_Guidi

>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:


Actually Diego, you can if your server does WFS-T (geoserver does). See
http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/wfs-protocol-transactions.html

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: creating a new layer in database

Bart van den Eijnden-5
Phil,

I don’t think you can create a new table in the database using WFS-T.

You can likely use GeoServer’s REST interface though.

Best regards,
Bart

--
Bart van den Eijnden
Front-end Developer | Boundless
@boundlessgeo

On 20 Nov 2013, at 21:32, Phil Scadden <[hidden email]> wrote:


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:


Actually Diego, you can if your server does WFS-T (geoserver does). See
http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/wfs-protocol-transactions.html

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: creating a new layer in database

pankaj123
Hi

I have search and I think you can't create a layer using open layers directly. So I will have to use the GeoSerevr REST API.

I have created the Database and Tables using the C# code.

I saw the documentation of GEoSever REST API. I could not find anything which can help me do this. I can see the existing layers, workspaces etc. but I cannot create any layer.

Any help. Any documentation, example any thing .


Thanks and Regards
Pankaj Bansal
Reply | Threaded
Open this post in threaded view
|

Re: creating a new layer in database

Bart van den Eijnden-5
See: http://docs.geoserver.org/stable/en/user/rest/api/featuretypes.html#rest-api-featuretypes-post

For further questions, please use the geoserver-users list instead.

Best regards,
Bart

--
Bart van den Eijnden
Front-end Developer | Boundless
@boundlessgeo

On 21 Nov 2013, at 19:31, pankaj123 <[hidden email]> wrote:

Hi

I have search and I think you can't create a layer using open layers
directly. So I will have to use the GeoSerevr REST API.

I have created the Database and Tables using the C# code.

I saw the documentation of GEoSever REST API. I could not find anything
which can help me do this. I can see the existing layers, workspaces etc.
but I cannot create any layer.

Any help. Any documentation, example any thing .


Thanks and Regards
Pankaj Bansal



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/creating-a-new-layer-in-database-tp5089934p5090541.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users