Another CSW question

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

Another CSW question

Paul Wittle-3

Hi,

 

This might be a silly question but perhaps the answer may help others trying to work this one out.

 

How do I return all results (or the next 10) from the CSW endpoing using a GET (or POST) request?

 

Might just be missing something obvious but I can’t see an example in the GeoServer documentation.

 

Cheers,

Paul

 

This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433

_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Another CSW question

Brad Hards

The GeoServer docs (https://docs.geoserver.org/stable/en/user/services/csw/index.html) refer you out to the OGC CSW docs for this. You’re probably looking for GetRecords (Section 10.8).

 

It probably would have been nicer if they’d provided more KVP examples, but hopefully you can translate across.

 

Brad

 

From: Paul Wittle <[hidden email]>
Sent: Thursday, 11 July 2019 7:44 PM
To: '[hidden email]' <[hidden email]>
Subject: [Geoserver-users] Another CSW question

 

Hi,

 

This might be a silly question but perhaps the answer may help others trying to work this one out.

 

How do I return all results (or the next 10) from the CSW endpoing using a GET (or POST) request?

 

Might just be missing something obvious but I can’t see an example in the GeoServer documentation.

 

Cheers,

Paul

 

This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433



_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Another CSW question

Paul Wittle-3

Thanks,

 

I did eventually find a POST example in the OGC documentation but at least one link to their site seemed to be broken in the documentation and it did add a bit more complexity to the work I was doing as I was issuing the request from FME and POST is more difficult to achieve than GET but there you go.

 

I would be useful if there was a POST example on the main documentation and here is an example of the post body I used in case it is helpful for others:

 

<?xml version="1.0" encoding="UTF-8"?>

<GetRecords

service="CSW"

version="2.0.2"

maxRecords="2000"

startPosition="1"

resultType="results"

outputFormat="application/xml"

outputSchema="http://www.opengis.net/cat/csw/2.0.2"

xmlns="http://www.opengis.net/cat/csw/2.0.2"

xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"

xmlns:ogc="http://www.opengis.net/ogc"

xmlns:ows="http://www.opengis.net/ows"

xmlns:dc="http://purl.org/dc/elements/1.1/"

xmlns:dct="http://purl.org/dc/terms/"

xmlns:gml="http://www.opengis.net/gml"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2

../../../csw/2.0.2/CSW-discovery.xsd">

  <Query typeNames="csw:Record">

<ElementSetName typeNames="csw:Record">full</ElementSetName>

<Constraint version="1.1.0">

<ogc:Filter>

     <ogc:PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">

         <ogc:PropertyName>dc:subject</ogc:PropertyName>

         <ogc:Literal>%QGIS%</ogc:Literal>

     </ogc:PropertyIsLike>

</ogc:Filter>

</Constraint>

</Query>

</GetRecords>

 

The example above will return any layers with “QGIS” in a Keyword. Note the use of maxRecords but you can combine that with startPosition to page through the results as well of course. I did try maxRecords as a GET request but I don’t believe it worked for me so I think it is POST only if your anything other than the first 10 results but I might be wrong on that.

 

Thanks,

Paul

 

From: Brad Hards <[hidden email]>
Sent: 11 July 2019 11:33
To: Paul Wittle <[hidden email]>; [hidden email]
Subject: RE: [Geoserver-users] Another CSW question

 

The GeoServer docs (https://docs.geoserver.org/stable/en/user/services/csw/index.html) refer you out to the OGC CSW docs for this. You’re probably looking for GetRecords (Section 10.8).

 

It probably would have been nicer if they’d provided more KVP examples, but hopefully you can translate across.

 

Brad

 

From: Paul Wittle <[hidden email]>
Sent: Thursday, 11 July 2019 7:44 PM
To: '[hidden email]' <[hidden email]>
Subject: [Geoserver-users] Another CSW question

 

Hi,

 

This might be a silly question but perhaps the answer may help others trying to work this one out.

 

How do I return all results (or the next 10) from the CSW endpoing using a GET (or POST) request?

 

Might just be missing something obvious but I can’t see an example in the GeoServer documentation.

 

Cheers,

Paul

 

This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433

This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433

_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Another CSW question

geowolf
On Fri, Jul 12, 2019 at 9:48 AM Paul Wittle <[hidden email]> wrote:

I would be useful if there was a POST example on the main documentation 



Cheers
Andrea 

== GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it 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.



_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Another CSW question

Paul Wittle-3

Hi,

 

I’m happy to do that so long as everyone feels the example is good enough and useful. It would be great to know it has worked for someone else using a different search term.

 

Cheers,

Paul

 

From: Andrea Aime <[hidden email]>
Sent: 12 July 2019 08:51
To: Paul Wittle <[hidden email]>
Cc: Brad Hards <[hidden email]>; [hidden email]
Subject: Re: [Geoserver-users] Another CSW question

 

On Fri, Jul 12, 2019 at 9:48 AM Paul Wittle <[hidden email]> wrote:

I would be useful if there was a POST example on the main documentation 

 

 

Cheers

Andrea 

 

== GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it 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.

This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433

_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Another CSW question

Jonathan Moules-4

Hi Paul,

The following is a valid GET request to get all records (via pagination) from a CSW:

http://www.example.com/my_csw?version=2.0.2&request=GetRecords&service=CSW&startposition=1&maxrecords=10&resulttype=results&typenames=csw%3ARecord&elementsetname=full&constraintlanguage=CQL_TEXT

It works with PyCSW and GeoNetwork CSW deployments. Doesn't work with ESRI GeoPortal - the constrainlanguage needs changing. I don't know if it works with the GeoServer CSW as I've not seen any of these in the wild; I'd be interested to find out if someone can point me to one.

Cheers,

Jonathan

On 2019-07-12 08:58, Paul Wittle wrote:

Hi,

 

I’m happy to do that so long as everyone feels the example is good enough and useful. It would be great to know it has worked for someone else using a different search term.

 

Cheers,

Paul

 

From: Andrea Aime [hidden email]
Sent: 12 July 2019 08:51
To: Paul Wittle [hidden email]
Cc: Brad Hards [hidden email]; [hidden email]
Subject: Re: [Geoserver-users] Another CSW question

 

On Fri, Jul 12, 2019 at 9:48 AM Paul Wittle <[hidden email]> wrote:

I would be useful if there was a POST example on the main documentation 

 

 

Cheers

Andrea 

 

== GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it 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.

This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433

_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users