[Geoserver-users] Deleting database table through REST API

Correcting myself here, wrong example, as the delete and re-populate uses a transaction, the above won’t cause data loss.
One can still go destructive by setting the “update” query parameter to “overwrite” by mistake though.

Cheers
Andrea

···

GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail

I am new to Geoserver and I have some boundary data that is stored as shapefiles that I would like to serve out to others. Do you have any guidance or instructions on how to accomplish this task?

Thanks,
Jim Rogers

Hi Jim

Here you have;

Publish:

https://www.youtube.com/watch?v=9tmVAzg1rqg

Style:

https://www.youtube.com/watch?v=WwihTphdz20

Enviado el: jueves, 14 de marzo de 2024 19:27

···

I am new to Geoserver and I have some boundary data that is stored as shapefiles that I would like to serve out to others. Do you have any guidance or instructions on how to accomplish this task? Thanks, Jim Rogers ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍

I am new to Geoserver and I have some boundary data that is stored as shapefiles that I would like to serve out to others. Do you have any guidance or instructions on how to accomplish this task?

Thanks,

Jim Rogers

No special guidance necessary, the installation and setup instructions describe publishing a geopackage - but the steps to publish a shape file are identical.

  1. Setup a workspace (I recommend only one to start)
  2. Setup a data store (in your case a shape file datastore)
  3. Publish the layer contained in the shape file (provide a name / title / abstract, check the spatial reference system / bounds)
  4. Verify the data looks okay in they layer preview, you can also try downloading GeoJSON if you like

How big is your shape file?

···


Jody Garnett

Hi Jim,

We should keep the conversation on the user-list so others can take part :slight_smile:

Looks like there is a tutorial directly for publishing a shape file in the user manual: https://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html

I would appreciate you trying out the release-candidate, the 2.25.0 release is planned for next week we would love feedback and testing.

···


Jody Garnett

Jody,

My GeoServer instance is running version 2.23.0

Is it possible to convert or save a shapefile format file into a WFS GML 2.0.0 format? If so, are there instructions available?

Thanks,

Jim

···

From: Jody Garnett <jody.garnett@…84…>
Sent: Thursday, March 14, 2024 3:54 PM
To: Jim Rogers <Jim.Rogers@…11953…>
Cc: geoserver-users geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Serving out shapefiles using Geoserver

This email was sent from an external server

Hi Jim,

We should keep the conversation on the user-list so others can take part :slight_smile:

Looks like there is a tutorial directly for publishing a shape file in the user manual: https://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html

I would appreciate you trying out the release-candidate, the 2.25.0 release is planned for next week we would love feedback and testing.

Jody Garnett

On Mar 14, 2024 at 12:50:26 PM, Jim Rogers <Jim.Rogers@…11953…> wrote:

Jody,

The size of the shapefile is 221,240 KB

Thanks for the instructions.

Jim

From: Jody Garnett <jody.garnett@…84…>
Sent: Thursday, March 14, 2024 3:43 PM
To: Jim Rogers <Jim.Rogers@…11953…>
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Serving out shapefiles using Geoserver

This email was sent from an external server

No special guidance necessary, the installation and setup instructions describe publishing a geopackage - but the steps to publish a shape file are identical.

  1. Setup a workspace (I recommend only one to start)
  2. Setup a data store (in your case a shape file datastore)
  3. Publish the layer contained in the shape file (provide a name / title / abstract, check the spatial reference system / bounds)
  4. Verify the data looks okay in they layer preview, you can also try downloading GeoJSON if you like

How big is your shape file?

Jody Garnett

On Mar 14, 2024 at 11:27:02 AM, Jim Rogers <Jim.Rogers@…11953…> wrote:

I am new to Geoserver and I have some boundary data that is stored as shapefiles that I would like to serve out to others. Do you have any guidance or instructions on how to accomplish this task?

Thanks,

Jim Rogers


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.

Publishing a shapefile is one of the getting started tutorials.
https://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html

Once published people can download as GML, GeoPackage, GeoJSON.

Tip: if using layer preview to test GML output it only downloads the first 50 features as a preview! You can edit the url to remove the max features number to download more (up to the limit set for WFS service in one request).

···


Jody Garnett

Jody,

Using the tutorial link below, I was able to successfully publish a shapefile and see it in Layer Preview when I clicked on OpenLayers.

But when I clicked on GML, I received the following message:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version=“1.2.0” xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">

error:Translator error Translator error Error reading Features Could not transform BF Admin Subdivision Boundaries.1 :org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

Any suggestions on how I can get GML to run successfully for my shapefile?

Jim

···

From: Jody Garnett <jody.garnett@…84…>
Sent: Friday, June 21, 2024 4:34 PM
To: Jim Rogers <Jim.Rogers@…11953…>
Cc: geoserver-users geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Serving out shapefiles using Geoserver

This email was sent from an external server

Publishing a shapefile is one of the getting started tutorials.

https://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html

Once published people can download as GML, GeoPackage, GeoJSON.

Tip: if using layer preview to test GML output it only downloads the first 50 features as a preview! You can edit the url to remove the max features number to download more (up to the limit set for WFS service in one request).

Jody Garnett

On Fri, Jun 21, 2024 at 12:15 PM Jim Rogers <Jim.Rogers@…11953…> wrote:

Jody,

In one e

My GeoServer instance is running version 2.23.0

Is it possible to convert or save a shapefile format file into a WFS GML 2.0.0 format? If so, are there instructions available?

Thanks,

Jim

From: Jody Garnett <jody.garnett@…84…>
Sent: Thursday, March 14, 2024 3:54 PM
To: Jim Rogers <Jim.Rogers@…11953…>
Cc: geoserver-users <geoserver-users@lists.sourceforge.net>
Subject: Re: [Geoserver-users] Serving out shapefiles using Geoserver

This email was sent from an external server

Hi Jim,

We should keep the conversation on the user-list so others can take part :slight_smile:

Looks like there is a tutorial directly for publishing a shape file in the user manual: https://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html

I would appreciate you trying out the release-candidate, the 2.25.0 release is planned for next week we would love feedback and testing.

Jody Garnett

On Mar 14, 2024 at 12:50:26 PM, Jim Rogers <Jim.Rogers@…11953…> wrote:

Jody,

The size of the shapefile is 221,240 KB

Thanks for the instructions.

Jim

From: Jody Garnett <jody.garnett@…84…>
Sent: Thursday, March 14, 2024 3:43 PM
To: Jim Rogers <Jim.Rogers@…11953…>
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Serving out shapefiles using Geoserver

This email was sent from an external server

No special guidance necessary, the installation and setup instructions describe publishing a geopackage - but the steps to publish a shape file are identical.

  1. Setup a workspace (I recommend only one to start)
  2. Setup a data store (in your case a shape file datastore)
  3. Publish the layer contained in the shape file (provide a name / title / abstract, check the spatial reference system / bounds)
  4. Verify the data looks okay in they layer preview, you can also try downloading GeoJSON if you like

How big is your shape file?

Jody Garnett

On Mar 14, 2024 at 11:27:02 AM, Jim Rogers <Jim.Rogers@…11953…> wrote:

I am new to Geoserver and I have some boundary data that is stored as shapefiles that I would like to serve out to others. Do you have any guidance or instructions on how to accomplish this task?

Thanks,

Jim Rogers


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.

Jody,

When I dropped the spaces in the title, I was able to click on GML successfully.

Jim

···

From: Jim Rogers
Sent: Monday, June 24, 2024 10:41 AM
To: Jody Garnett <jody.garnett@…84…>
Cc: geoserver-users geoserver-users@lists.sourceforge.net
Subject: RE: [Geoserver-users] Serving out shapefiles using Geoserver

Jody,

Using the tutorial link below, I was able to successfully publish a shapefile and see it in Layer Preview when I clicked on OpenLayers.

But when I clicked on GML, I received the following message:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version=“1.2.0” xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">

error:Translator error Translator error Error reading Features Could not transform BF Admin Subdivision Boundaries.1 :org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

Any suggestions on how I can get GML to run successfully for my shapefile?

Jim

From: Jody Garnett <jody.garnett@…84…>
Sent: Friday, June 21, 2024 4:34 PM
To: Jim Rogers <Jim.Rogers@…11953…>
Cc: geoserver-users <geoserver-users@lists.sourceforge.net>
Subject: Re: [Geoserver-users] Serving out shapefiles using Geoserver

This email was sent from an external server

Publishing a shapefile is one of the getting started tutorials.

https://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html

Once published people can download as GML, GeoPackage, GeoJSON.

Tip: if using layer preview to test GML output it only downloads the first 50 features as a preview! You can edit the url to remove the max features number to download more (up to the limit set for WFS service in one request).

Jody Garnett

On Fri, Jun 21, 2024 at 12:15 PM Jim Rogers <Jim.Rogers@…11953…> wrote:

Jody,

In one e

My GeoServer instance is running version 2.23.0

Is it possible to convert or save a shapefile format file into a WFS GML 2.0.0 format? If so, are there instructions available?

Thanks,

Jim

From: Jody Garnett <jody.garnett@…84…>
Sent: Thursday, March 14, 2024 3:54 PM
To: Jim Rogers <Jim.Rogers@…11953…>
Cc: geoserver-users <geoserver-users@lists.sourceforge.net>
Subject: Re: [Geoserver-users] Serving out shapefiles using Geoserver

This email was sent from an external server

Hi Jim,

We should keep the conversation on the user-list so others can take part :slight_smile:

Looks like there is a tutorial directly for publishing a shape file in the user manual: https://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html

I would appreciate you trying out the release-candidate, the 2.25.0 release is planned for next week we would love feedback and testing.

Jody Garnett

On Mar 14, 2024 at 12:50:26 PM, Jim Rogers <Jim.Rogers@…11953…> wrote:

Jody,

The size of the shapefile is 221,240 KB

Thanks for the instructions.

Jim

From: Jody Garnett <jody.garnett@…84…>
Sent: Thursday, March 14, 2024 3:43 PM
To: Jim Rogers <Jim.Rogers@…11953…>
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Serving out shapefiles using Geoserver

This email was sent from an external server

No special guidance necessary, the installation and setup instructions describe publishing a geopackage - but the steps to publish a shape file are identical.

  1. Setup a workspace (I recommend only one to start)
  2. Setup a data store (in your case a shape file datastore)
  3. Publish the layer contained in the shape file (provide a name / title / abstract, check the spatial reference system / bounds)
  4. Verify the data looks okay in they layer preview, you can also try downloading GeoJSON if you like

How big is your shape file?

Jody Garnett

On Mar 14, 2024 at 11:27:02 AM, Jim Rogers <Jim.Rogers@…11953…> wrote:

I am new to Geoserver and I have some boundary data that is stored as shapefiles that I would like to serve out to others. Do you have any guidance or instructions on how to accomplish this task?

Thanks,

Jim Rogers


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.

The different protocols have different restrictions on the name (however the Title should be human readable and free to change).

As an example xml documents (like GML) require an alpha or _ character to start with and then are alphanumeric as they need to be used as an XML type name / document element / thing …

Other protocols like WCS are okay with having layers names start with a number (apparently common for raster data?).

I tried to provide testing for naming of layers; but it ended up being too complicated to implement so I backed out the change. I would still like to see warnings if a name is not suitable for a protocol so you could get some feedback when editing the layer.

···


Jody Garnett

Jody,

If I have a PostgreSQL database that contains spatial coordinates, do you know how I convert that database into PostGIS format so I can publish it on GeoServer?

Jim Rogers

Hello Jim,

To do so, you have first to add a Geometry column to your table (you can be more precise on the type of Geometry by using for example Point as type). You have to define also the SRS of the coordinates.

To populate your column you can for example use the ST_MakePoint function using the coordinates available in the other columns.

The last step would be to add a spatial index on the geometry column in order to have great performances.

Have a look at https://postgis.net/docs/reference.html, the documentation is quite complete.

Regards
Alexandre

Le lun. 24 juin 2024 à 22:37, Jim Rogers <Jim.Rogers@anonymised.com> a écrit :

Jody,

If I have a PostgreSQL database that contains spatial coordinates, do you know how I convert that database into PostGIS format so I can publish it on GeoServer?

Jim Rogers


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Have you installed the ostGIS extension?

CREATE EXTENSION postgis;

If so you can add a Geometry column with;

https://postgis.net/docs/AddGeometryColumn.html

Set the SRID to what your data is.

Then you ST_MakePoint (If it is point data) to update the new column using the data from other fields in the row.

https://postgis.net/docs/ST_MakePoint.html

Something like UPDATE tablename set the_geom=ST_makePoint(X, Y)

Jody,

If I have a PostgreSQL database that contains spatial coordinates, do you know how I convert that database into PostGIS format so I can publish it on GeoServer?

Jim Rogers
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net <mailto:Geoserver-users@anonymised.comeforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users