My geometry column def is: geom geometry(MultiPolygon, 4326)

Here's the resulting sql:

SELECT encode(ST_AsBinary(ST_Force2D("geom")),'base64') as "geom" FROM
"land_polygons" WHERE  "geom" && ST_GeomFromWKB($1, 4326)

And my datastore.xml:

<dataStore>
  <id>DataStoreInfoImpl-xxxxx</id>
  <name>osm</name>
  <type>PostGIS (JNDI)</type>
  <enabled>true</enabled>
  <workspace>
    <id>WorkspaceInfoImpl-xxxx</id>
  </workspace>
  <connectionParameters>
    <entry key="preparedStatements">true</entry>
    <entry key="Estimated extends">true</entry>
    <entry key="fetch size">2000</entry>
    <entry key="encode functions">false</entry>
    <entry key="jndiReferenceName">java:comp/env/jdbc/osm</entry>
    <entry key="Support on the fly geometry simplification">true</entry>
    <entry key="Expose primary keys">false</entry>
    <entry key="dbtype">postgis</entry>
    <entry key="namespace">http://newmoyergeospatial.com</entry>
    <entry key="Loose bbox">true</entry>
  </connectionParameters>
  <__default>false</__default>
</dataStore>



Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
ja...@newmoyergeospatial.com



On Tue, Sep 5, 2017 at 11:28 AM, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:

> Hi,
> checking the code, there are two cases in which ST_Simplify is not called:
>
>    - If the column is geography instead of geometry (I guess at the time
>    of writing st_simplify did not work against geography, not sure if it does
>    today)
>    - If the column type contains curved geometries, which ST_Simplify
>    cannot handle, at least in the version of postgis that I tested (throws an
>    error). I believe the ticket I opened at postgis to get a function telling
>    me if st_simplify would work got recently closed, they decided not to fix
>    it that way, but to linearize geometries before st_simplify instead.
>    However, not sure if the linearization already happened, and starting with
>    which version of postgis
>
> Jason, are you falling in any of these cases?
>
> Cheers
> Andrea
>
>
> On Tue, Sep 5, 2017 at 4:50 PM, Rahkonen Jukka (MML) <jukka.rahkonen@
> maanmittauslaitos.fi> wrote:
>
>> Hi,
>>
>>
>>
>> I copied the states shapefile into PostGIS and had a try with GeoServer
>> 2.11. GetMap with a WMS client generates SQL queries like this:
>>
>>
>>
>> 05 syyskuuta 17:46:07 DEBUG [org.geotools.jdbc] - SELECT
>> "gid",encode(ST_AsBinary(ST_Simplify(ST_Force2D("geom"),
>> 0.05529411764705401)),'base64') as "geom" FROM
>>
>> "public"."states" WHERE  ("geom" && ST_GeomFromText('POLYGON
>> ((212.626470588235
>>
>> 3 22.861764705882347, 212.6264705882353 70.13823529411765,
>> 301.3735294117647 70.
>>
>> 13823529411765, 301.3735294117647 22.861764705882347, 212.6264705882353
>> 22.86176
>>
>> 4705882347 <(470)%20588-2347>))', 4326) OR "geom" &&
>> ST_GeomFromText('POLYGON ((-147.3735294117647
>>
>> 22.861764705882347, -147.3735294117647 70.13823529411765,
>> -58.62647058823529 70.
>>
>> 13823529411765, -58.62647058823529 22.861764705882347, -147.3735294117647
>> 22.861
>>
>> 764705882347))', 4326))
>>
>>
>>
>> So Geoserver does add ST_Simplify for me. I can’t understand why it does
>> not do that for you.
>>
>>
>>
>> -Jukka Rahkonen-
>>
>>
>>
>> *Lähettäjä:* Jason Newmoyer [mailto:ja...@newmoyergeospatial.com]
>> *Lähetetty:* 5. syyskuuta 2017 17:10
>> *Vastaanottaja:* GeoServer Mailing List List <
>> geoserver-users@lists.sourceforge.net>
>> *Aihe:* [Geoserver-users] Using simplify function in SLD
>>
>>
>>
>> My idea was to use simplify as a geometry transformation in my SLD to
>> improve performance at certain scales where OSM data is just too heavy and
>> all the normal tricks for performance just don't cut it.
>>
>>
>>
>> Reading the function reference
>> <http://docs.geoserver.org/latest/en/user/filter/function_reference.html#filter-function-reference>
>> it says: "If a function is described in the Capabilities document but is
>> not in this reference, then it might mean that the function cannot be used
>> for filtering, or that it is new and has not been documented. Ask for
>> details on the user mailing list."
>>
>>
>>
>> How is the "approved" function list controlled? Is there a way to change
>> it by configuration?
>>
>>
>>
>> By the way I'm using PostGIS with "on the fly simplification" enabled but
>> still the queries do NOT use ST_Simplify. It seems like this would be a
>> better solution. Where can I learn more about how this feature works?
>>
>>
>> Thanks,
>> Jason
>>
>>
>>
>>
>> Jason Newmoyer
>> Newmoyer Geospatial Solutions
>>
>> 843.606.0424 <(843)%20606-0424>
>>
>> ja...@newmoyergeospatial.com
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> 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
>>
>> 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
> 55054  Massarosa (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

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

Reply via email to