I figured something like that. Can you share a reference for that? I know I
went looking and couldn't find anything.
Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
ja...@newmoyergeospatial.com
On Thu, Mar 8, 2018 at 10:18 AM, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:
> Hi,
> id, unquoted, is a keyword in CQL, not an attribute name :)
>
> Cheers
> Andrea
>
> On Thu, Mar 8, 2018 at 4:08 PM, Jason Newmoyer <
> ja...@newmoyergeospatial.com> wrote:
>
>> Ran into this same issue, but with WMS. For me, quoting "id" in the CQL
>> made it work. This doesn't seem to be required for other fields in the same
>> table. So maybe just something special for ones named "id"
>>
>>
>> Jason Newmoyer
>> Newmoyer Geospatial Solutions
>> 843.606.0424 <(843)%20606-0424>
>> ja...@newmoyergeospatial.com
>>
>>
>>
>> On Wed, Mar 7, 2018 at 6:14 PM, Walter Nordmann <wnordm...@gmx.de> wrote:
>>
>>> got it.
>>>
>>> after setting "id" to be the primary key, the query is returning results.
>>>
>>> regards
>>> walter
>>>
>>>
>>>
>>> Am 07.03.2018 um 19:31 schrieb Walter Nordmann:
>>>
>>>> Hi
>>>>
>>>> still using geoserver 2.8
>>>>
>>>> i'm trying to get some polygons calling my local GeoServer using
>>>> javascript and ajax.
>>>>
>>>> doing this call
>>>>
>>>> data: {
>>>> service : "WFS",
>>>> version : "1.1.0",
>>>> request : "GetFeature",
>>>> outputFormat : "application/json",
>>>> SrsName : "EPSG:4326",
>>>> typeName: "osm:Admin Boundaries",
>>>> cql_filter: "id=403139"
>>>> },
>>>>
>>>> is working fine as can be seen in the log:
>>>>
>>>> 2018-03-07 19:11:39,441 INFO [geoserver.wfs] -
>>>> Request: getFeature
>>>> service = WFS
>>>> version = 1.1.0
>>>> baseUrl = http://localhost:8080/geoserver/
>>>> query[0]:
>>>> filter = [ id = 403139 ]
>>>> srsName = EPSG:4326
>>>> typeName[0] = {osm.osm.org}Admin Boundaries
>>>> outputFormat = application/json
>>>> resultType = results
>>>> 2018-03-07 19:11:39,442 INFO [wfs.json] - about to encode JSON
>>>> 2018-03-07 19:11:39,442 DEBUG [geotools.jdbc] - CREATE CONNECTION
>>>> 2018-03-07 19:11:39,449 DEBUG [geotools.jdbc] - CLOSE CONNECTION
>>>> 2018-03-07 19:11:39,449 DEBUG [geotools.jdbc] - CREATE CONNECTION
>>>> 2018-03-07 19:11:39,452 DEBUG [geotools.filter] - exporting SQL
>>>> ComparisonFilter
>>>> 2018-03-07 19:11:39,452 DEBUG [geotools.filter] - exporting PropertyName
>>>> 2018-03-07 19:11:39,452 DEBUG [geotools.filter] - exporting
>>>> LiteralExpression
>>>> 2018-03-07 19:11:39,452 DEBUG [geotools.jdbc] - SELECT count(*) FROM
>>>> (select id,
>>>> value "name",
>>>> localname,
>>>> level admin_level,
>>>> way
>>>> from boundaries
>>>> ) as "vtable" WHERE "id" = 403139
>>>> 2018-03-07 19:11:39,454 DEBUG [geotools.jdbc] - CLOSE CONNECTION
>>>> ...
>>>>
>>>> "WHERE id=403139" has been added to the query.
>>>>
>>>> Changing cql_filter to "id in(403139,1374326)" will give no result.
>>>>
>>>> 2018-03-07 19:24:19,377 INFO [geoserver.wfs] -
>>>> Request: getFeature
>>>> service = WFS
>>>> version = 1.1.0
>>>> baseUrl = http://localhost:8080/geoserver/
>>>> query[0]:
>>>> filter = [ 403139, 1374326 ]
>>>> srsName = EPSG:4326
>>>> typeName[0] = {osm.osm.org}Admin Boundaries
>>>> outputFormat = application/json
>>>> resultType = results
>>>> 2018-03-07 19:24:19,378 INFO [wfs.json] - about to encode JSON
>>>> 2018-03-07 19:24:19,378 DEBUG [geotools.jdbc] - CREATE CONNECTION
>>>> 2018-03-07 19:24:19,384 DEBUG [geotools.jdbc] - CLOSE CONNECTION
>>>> 2018-03-07 19:24:19,384 TRACE [geotools.core] - condition:
>>>> Filter.INCLUDE
>>>> 2018-03-07 19:24:19,384 DEBUG [geotools.jdbc] - CREATE CONNECTION
>>>> 2018-03-07 19:24:19,385 DEBUG [geotools.jdbc] - SELECT count(*) FROM
>>>> (select id,
>>>> value "name",
>>>> localname,
>>>> level admin_level,
>>>> way
>>>> from boundaries
>>>> ) as "vtable" WHERE 0 = 1
>>>> 2018-03-07 19:24:19,386 DEBUG [geotools.jdbc] - CLOSE CONNECTION
>>>>
>>>> Strange to me is "filter [403137, 1374326]" without specifing "id".
>>>>
>>>> any hints?
>>>>
>>>> Regards
>>>> walter
>>>>
>>>> btw: i need the select list because this part will be dynamic later.
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> 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-req
>>>> uesting-and-integrating-new-features-and-improvements-in-GeoServer
>>>>
>>>>
>>>> Geoserver-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>>
>>>
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> 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-req
>>> uesting-and-integrating-new-features-and-improvements-in-GeoServer
>>>
>>>
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> 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-req
>> uesting-and-integrating-new-features-and-improvements-in-GeoServer
>>
>>
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
>
> --
>
> Regards,
>
> Andrea Aime
>
> ==
> 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
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
> 55054 Massarosa
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
> (LU)
> phone: +39 0584 962313 <+39%200584%20962313>
> fax: +39 0584 1660272 <+39%200584%20166%200272>
> mob: +39 339 8844549 <+39%20339%20884%204549>
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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