Hi,

Instead of publishing a feature type directly from the store, use a sql view.

That way you can specify the ID column by selecting the column name as 
Identifier. You'll be able to rename fields using sql AS keyword, perform 
joins, etc ... All the power of SQL.

Have a look at this : 
https://docs.geoserver.org/master/en/user/data/database/sqlview.html

Good luck !


Envoyé à partir d’Outlook<http://aka.ms/weboutlook>

________________________________
De : Arjun Dongre via Geoserver-users <geoserver-users@lists.sourceforge.net>
Envoyé : 25 août 2021 10:27
À : geoserver-users@lists.sourceforge.net 
<geoserver-users@lists.sourceforge.net>
Objet : Re: [Geoserver-users] Geoserver ResourceId (rid) filter

Sorry, to specify, we are publishing a view from postgis. I don't think you can 
set a "primary key" in a postgres view. I was assuming you could select the 
field in the geoserver layer settings.

On Wed, Aug 25, 2021 at 10:23 AM Arjun Dongre 
<adon...@west-inc.com<mailto:adon...@west-inc.com>> wrote:
This is exactly what is happening, how do I specify the unique id field?

On Wed, Aug 25, 2021 at 10:07 AM Olivier Gagnon 
<mcno...@hotmail.com<mailto:mcno...@hotmail.com>> wrote:
Hi,

Geoserver will generate a distinct ID for all features for you if you don't 
specify the field to use as ID while using a sql view as source.

If you don't specify it, Geoserver will generate an ID of this format : 
layerName.uid (ex: LayerName.fid-1e25e6bb_17b7379da69_-720a)

If you specify a field to represent the unique ID then the value of this field 
will be bound to each feature in this format : layerName.fieldValue (ex: 
layerName.1)

Hope this helps.

Good luck


Envoyé à partir d’Outlook<http://aka.ms/weboutlook>

________________________________
De : Arjun Dongre via Geoserver-users 
<geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>>
Envoyé : 25 août 2021 08:37
À : 
geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>
 
<geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>>
Objet : [Geoserver-users] Geoserver ResourceId (rid) filter

Good morning,
Im running into an issue with ArcGIS Pro trying to retrieve WFS data through 
http post method. The program is trying to request data from our geoserver 
instance with a filter on rid:

  <fes:Filter>
    <fes:ResourceId rid="{layer}.0"/>
  </fes:Filter>

I see in the OGC 2.0 specifications that the server should specify a resource 
id for every feature.

Am I supposed to add this field myself? Is geoserver supposed to do it 
automatically? We are running 2.18.2. Is this fixed in layer versions?

Any guidance would be greatly appreciated. Thanks!

--
Arjun Dongre

[http://west-inc.com/images/westlogo.png]
Western EcoSystems Technology, Inc.
Environmental & Statistical Consultants
415 W. 17th St. Suite 200
Cheyenne, WY 82001
adon...@west-inc.com<mailto:adon...@west-inc.com>
www.west-inc.com<http://www.west-inc.com/>

Follow WEST: 
Facebook<http://www.facebook.com/pages/Western%E2%80%90EcoSystems%E2%80%90Technology%E2%80%90WESTInc/125604770807646>,
 Twitter<http://twitter.com/WestEcoSystems>, Linked 
In<http://www.linkedin.com/company/1458419>, Join our Mailing 
list<http://visitor.r20.constantcontact.com/manage/optin/ea?v=001qrD4A3S5xJ5KgMyelH9jyw%3D%3D>

CONFIDENTIALITY NOTICE:  This message and any accompanying communications are 
covered by the Electronic Communications Privacy Act, 18 U.S.C. §§ 2510-2521, 
and contain information that is privileged, confidential or otherwise protected 
from disclosure.  If you are not the intended recipient or an agent responsible 
for delivering the communication to the intended recipient, you are hereby 
notified that you have received this communication in error.  Dissemination, 
distribution or copying of this e-mail or the information herein by anyone 
other than the intended recipient, or an employee or agent responsible for 
delivering the message to the intended recipient, is prohibited.  If you have 
received this communication in error, please notify us immediately by e-mail 
and delete the original message.  Thank you.

P Please consider the environment before printing.



--
Arjun Dongre

[http://west-inc.com/images/westlogo.png]
Western EcoSystems Technology, Inc.
Environmental & Statistical Consultants
415 W. 17th St. Suite 200
Cheyenne, WY 82001
adon...@west-inc.com<mailto:adon...@west-inc.com>
www.west-inc.com<http://www.west-inc.com/>

Follow WEST: 
Facebook<http://www.facebook.com/pages/Western%E2%80%90EcoSystems%E2%80%90Technology%E2%80%90WESTInc/125604770807646>,
 Twitter<http://twitter.com/WestEcoSystems>, Linked 
In<http://www.linkedin.com/company/1458419>, Join our Mailing 
list<http://visitor.r20.constantcontact.com/manage/optin/ea?v=001qrD4A3S5xJ5KgMyelH9jyw%3D%3D>

CONFIDENTIALITY NOTICE:  This message and any accompanying communications are 
covered by the Electronic Communications Privacy Act, 18 U.S.C. §§ 2510-2521, 
and contain information that is privileged, confidential or otherwise protected 
from disclosure.  If you are not the intended recipient or an agent responsible 
for delivering the communication to the intended recipient, you are hereby 
notified that you have received this communication in error.  Dissemination, 
distribution or copying of this e-mail or the information herein by anyone 
other than the intended recipient, or an employee or agent responsible for 
delivering the message to the intended recipient, is prohibited.  If you have 
received this communication in error, please notify us immediately by e-mail 
and delete the original message.  Thank you.

P Please consider the environment before printing.



--
Arjun Dongre

[http://west-inc.com/images/westlogo.png]
Western EcoSystems Technology, Inc.
Environmental & Statistical Consultants
415 W. 17th St. Suite 200
Cheyenne, WY 82001
adon...@west-inc.com<mailto:adon...@west-inc.com>
www.west-inc.com<http://www.west-inc.com/>

Follow WEST: 
Facebook<http://www.facebook.com/pages/Western%E2%80%90EcoSystems%E2%80%90Technology%E2%80%90WESTInc/125604770807646>,
 Twitter<http://twitter.com/WestEcoSystems>, Linked 
In<http://www.linkedin.com/company/1458419>, Join our Mailing 
list<http://visitor.r20.constantcontact.com/manage/optin/ea?v=001qrD4A3S5xJ5KgMyelH9jyw%3D%3D>

CONFIDENTIALITY NOTICE:  This message and any accompanying communications are 
covered by the Electronic Communications Privacy Act, 18 U.S.C. §§ 2510-2521, 
and contain information that is privileged, confidential or otherwise protected 
from disclosure.  If you are not the intended recipient or an agent responsible 
for delivering the communication to the intended recipient, you are hereby 
notified that you have received this communication in error.  Dissemination, 
distribution or copying of this e-mail or the information herein by anyone 
other than the intended recipient, or an employee or agent responsible for 
delivering the message to the intended recipient, is prohibited.  If you have 
received this communication in error, please notify us immediately by e-mail 
and delete the original message.  Thank you.

P Please consider the environment before printing.

_______________________________________________
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
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to