Re: [Geoserver-users] weird contour lines when using rendering transformation for coverage view

2022-09-13 Thread Vera Green
Looks like you are essentially giving a OR logic streamif this OR this
OR this OR this draw me. You might need to change this to an AND logic
instead.

Hope this makes sense.

On Tue., Sep. 13, 2022, 1:28 p.m. Andres Trei, 
wrote:

> Hi list.
>
> I have a netcdf store that contains multiple variables. I am trying to
> serve it as a coverage view, publishing 3 variables out of a total 7. Now
> the issue comes when trying to draw contour lines for 1 of the variables in
> view. In addition to the contours that should be there, geoserver also
> renders some additional funky contours that I have no idea where they come
> from and I believe should not be there. Below is a snippet from my SLD. If
> I remove the other 2 variables from my coverage view, everything seems to
> be ok. It looks like geoserver does not respect band parameter and uses
> data from other 2 bands also to render contours (just guessing here). Don't
> see any errors in logs.
>
> 
>   
>
> 
>   data
> 
>
> 
>   band
>   0
> 
> 
>   levels
>   0.5
>   1
>   1.5
>   2
>   2.5
>   3
>   3.5
>   4
>   4.5
>   5
> 
>   
> 
>
> Some screenshots:
>
> https://drive.google.com/file/d/1heaKCnozG60EBrx-tuJaV5Dxow1FoRhc/view?usp=sharing
>
> https://drive.google.com/file/d/1pfMHjmjhGLhHqGV171UxZn7F6cbdnqKK/view?usp=sharing
>
> https://drive.google.com/file/d/1gizFNsbXlXgOOko2fxpdZRro26LwiEPD/view?usp=sharing
>
>
> A related question for the coverage view. While using ncwms extension and
> the GetTimeSeries request to extract data on map click, the request returns
> data only for the first band in coverage view, while I was assuming I would
> get for all 3 bands. Is this expected? I've built the extension myself to
> match the geoserver version. Here's the decoded request:
>
>
> http://localhost:8088/geoserver/wms?REQUEST=GetTimeSeries=WMS==true=1.3.0=image/png=21.733703613281254,58.676937672586924,22.787017822265625,59.26026554911028=824=767=2022-09-13T12:00:00.000Z/2022-09-14T03:00:00.000Z=test_ws:dmi_waves_LAYERS=test_ws:dmi_waves_FORMAT=text/csv=206=446
>
>
> Geoserver version: 2.19.2
> Java: openjdk version "1.8.0_332"
> OS: macOS 12.5.1
> ___
> 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
>
___
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


[Geoserver-users] weird contour lines when using rendering transformation for coverage view

2022-09-13 Thread Andres Trei
Hi list.

I have a netcdf store that contains multiple variables. I am trying to
serve it as a coverage view, publishing 3 variables out of a total 7. Now
the issue comes when trying to draw contour lines for 1 of the variables in
view. In addition to the contours that should be there, geoserver also
renders some additional funky contours that I have no idea where they come
from and I believe should not be there. Below is a snippet from my SLD. If
I remove the other 2 variables from my coverage view, everything seems to
be ok. It looks like geoserver does not respect band parameter and uses
data from other 2 bands also to render contours (just guessing here). Don't
see any errors in logs.


  


  data



  band
  0


  levels
  0.5
  1
  1.5
  2
  2.5
  3
  3.5
  4
  4.5
  5

  


Some screenshots:
https://drive.google.com/file/d/1heaKCnozG60EBrx-tuJaV5Dxow1FoRhc/view?usp=sharing
https://drive.google.com/file/d/1pfMHjmjhGLhHqGV171UxZn7F6cbdnqKK/view?usp=sharing
https://drive.google.com/file/d/1gizFNsbXlXgOOko2fxpdZRro26LwiEPD/view?usp=sharing


A related question for the coverage view. While using ncwms extension and
the GetTimeSeries request to extract data on map click, the request returns
data only for the first band in coverage view, while I was assuming I would
get for all 3 bands. Is this expected? I've built the extension myself to
match the geoserver version. Here's the decoded request:

http://localhost:8088/geoserver/wms?REQUEST=GetTimeSeries=WMS==true=1.3.0=image/png=21.733703613281254,58.676937672586924,22.787017822265625,59.26026554911028=824=767=2022-09-13T12:00:00.000Z/2022-09-14T03:00:00.000Z=test_ws:dmi_waves_LAYERS=test_ws:dmi_waves_FORMAT=text/csv=206=446


Geoserver version: 2.19.2
Java: openjdk version "1.8.0_332"
OS: macOS 12.5.1
___
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


Re: [Geoserver-users] Smart Data Loader and Feature Templating plugins fail to work with Array Type (PostgreSQL)

2022-09-13 Thread Henning Lorenz

Hi Andrea,

Thanks for your thoughts and background information. After some testing, 
I can confirm that Array Type columns from the PostGIS data source are 
handled as expected (geoserver 2.21.1). But it wasn't clear to me from 
the documentation that this is only possible when directly feature 
templating a layer of a PostGIS data source. Just to sum up the present 
capabilities:


 * Layer based on PostGIS datastore: Array Type data are handled
   correctly by Feature Templating, no access to related tables
 * Layer based on App Schema datastore: Related tables can be accessed
   by Feature Templating, but Array Type data are not handled (error)

Let's see how this develops. Thanks again Nuno & Andrea for answering my 
questions.


Best, Henning


On 2022-09-13 09:38, Andrea Aime wrote:

Hi,
array support is working properly in the context of the STAC API usage 
of features templating, which in turn
uses a customized data store producing, among others, properties of 
type array, and then feature templates are applied

to generate STAC Items.
This is on the main branch, although some level of support is 
available on 2.21.x too (don't remember exactly what got backported 
and what did not).


In your case, what are you doing? Using features templating directly 
against a PostGIS data source, to customize the output
of a WFS or OGC API Features? I don't think we ever tried that, it may 
work, or not.


In terms of getting it to work, you'll have to find either programming 
time or a bag of money, or wait for someone else to stumble
into the same problem, and act on it. If you want to investigate the 
code on your side and have questions, please ask on the list,
always happy to get another developer up to speed (within reason of 
course, all the activity on this list is volunteer based).


Cheers
Andrea


On Tue, Sep 13, 2022 at 8:55 AM Henning Lorenz 
 wrote:


Hi Nuno,

Thinking about your reply, I can't bring it in line with the
documentation and my observations, because I don't create array
attributes with App Schema:

  * A column with Array Type is defined in PostgreSQL, i.e. the
database query returns an array to Geoserver
  * The Feature Templating documentation that I linked earlier
clearly refers to Array Type in databases (i.e. the situation
in my case, if I do not completely misunderstand)
  * Feature Templating produces a "[Ljava.lang.String;@..."
 error
  * My web searches suggest that a "[Ljava.lang.String;@..."
 error indicates that an array
is passed to a function that expects string only, which
suggests that App Schema correctly passes on the Array Type
data to Feature Templating, but Feature templating doesn't
understand it in contradiction to the documentation.

A first step would be to decide whether I am unable to interpret
the documentation correctly. Then to think what resources are
needed for full array support and how to get them (I'd like to
have a bag of money for this, but I don't ...).

Best wishes,

Henning


On 2022-09-13 00:11, Nuno Oliveira wrote:

Hi Henning,
that's a good point, if my memory serves me well, if an array
reaches features-templating it will work as described (this is
used for some advanced integrations with features-templating),
but I don't think that App-Schema and Smart Data Loader can
produce array attributes.

So summarizing:

  * Features-templating support arrays,
  * but you cannot produce array attributes with App-Schema or
Smart Data Loader,
  * hence you can't use arrays unless you create them
programmatically.

@Marco Volpini  did I
miss something?

Kind regards,
Nuno Oliveira




On Fri, Sep 9, 2022 at 12:27 PM Henning Lorenz
 wrote:

Dear Nuno,

Thanks for the quick reply. However, for the Feature
Templating plugin, it contradicts the documentation where
Array Type support for json output is explicitly mentioned:

https://docs.geoserver.org/stable/en/user/community/features-templating/directives.html#array-based-properties-json-based-templates-only

Is the documentation wrong and needs to be updated?

Best wishes,

Henning


On 2022-09-09 11:42, Nuno Oliveira wrote:

Dear Henning,
those modules do not support array column types, this would
be a nice feature to have.

A pull request contributing it would be very welcomed, you
may also want to check the GeoServer Support
 in case you want to fund it.

Kind regards,
Nuno Oliveira

On Fri, Sep 9, 2022 at 10:13 AM Henning Lorenz
 wrote:

geoserver 2.21, app schema/smart data loader/ogc
  

Re: [Geoserver-users] Smart Data Loader and Feature Templating plugins fail to work with Array Type (PostgreSQL)

2022-09-13 Thread Andrea Aime
Hi,
array support is working properly in the context of the STAC API usage of
features templating, which in turn
uses a customized data store producing, among others, properties of type
array, and then feature templates are applied
to generate STAC Items.
This is on the main branch, although some level of support is available on
2.21.x too (don't remember exactly what got backported and what did not).

In your case, what are you doing? Using features templating directly
against a PostGIS data source, to customize the output
of a WFS or OGC API Features? I don't think we ever tried that, it may
work, or not.

In terms of getting it to work, you'll have to find either programming time
or a bag of money, or wait for someone else to stumble
into the same problem, and act on it. If you want to investigate the code
on your side and have questions, please ask on the list,
always happy to get another developer up to speed (within reason of course,
all the activity on this list is volunteer based).

Cheers
Andrea


On Tue, Sep 13, 2022 at 8:55 AM Henning Lorenz 
wrote:

> Hi Nuno,
>
> Thinking about your reply, I can't bring it in line with the documentation
> and my observations, because I don't create array attributes with App
> Schema:
>
>- A column with Array Type is defined in PostgreSQL, i.e. the database
>query returns an array to Geoserver
>- The Feature Templating documentation that I linked earlier clearly
>refers to Array Type in databases (i.e. the situation in my case, if I do
>not completely misunderstand)
>- Feature Templating produces a "[Ljava.lang.String;@..."
><[Ljava.lang.String;@...> error
>- My web searches suggest that a "[Ljava.lang.String;@..."
><[Ljava.lang.String;@...> error indicates that an array is passed to a
>function that expects string only, which suggests that App Schema correctly
>passes on the Array Type data to Feature Templating, but Feature templating
>doesn't understand it in contradiction to the documentation.
>
> A first step would be to decide whether I am unable to interpret the
> documentation correctly. Then to think what resources are needed for full
> array support and how to get them (I'd like to have a bag of money for
> this, but I don't ...).
>
> Best wishes,
>
> Henning
>
>
> On 2022-09-13 00:11, Nuno Oliveira wrote:
>
> Hi Henning,
> that's a good point, if my memory serves me well, if an array reaches
> features-templating it will work as described (this is used for some
> advanced integrations with features-templating), but I don't think that
> App-Schema and Smart Data Loader can produce array attributes.
>
> So summarizing:
>
>- Features-templating support arrays,
>- but you cannot produce array attributes with App-Schema or Smart
>Data Loader,
>- hence you can't use arrays unless you create them programmatically.
>
> @Marco Volpini  did I miss something?
>
> Kind regards,
> Nuno Oliveira
>
>
>
>
> On Fri, Sep 9, 2022 at 12:27 PM Henning Lorenz 
> wrote:
>
>> Dear Nuno,
>>
>> Thanks for the quick reply. However, for the Feature Templating plugin,
>> it contradicts the documentation where Array Type support for json output
>> is explicitly mentioned:
>> https://docs.geoserver.org/stable/en/user/community/features-templating/directives.html#array-based-properties-json-based-templates-only
>>
>> Is the documentation wrong and needs to be updated?
>>
>> Best wishes,
>>
>> Henning
>>
>>
>> On 2022-09-09 11:42, Nuno Oliveira wrote:
>>
>> Dear Henning,
>> those modules do not support array column types, this would be a nice
>> feature to have.
>>
>> A pull request contributing it would be very welcomed, you may also want
>> to check the GeoServer Support  in case
>> you want to fund it.
>>
>> Kind regards,
>> Nuno Oliveira
>>
>> On Fri, Sep 9, 2022 at 10:13 AM Henning Lorenz 
>> wrote:
>>
>>> geoserver 2.21, app schema/smart data loader/ogc api/feature templating
>>> plugins (Tomcat 9 on Ubuntu 22.04; openjdk 11.0.16)
>>>
>>> Hello,
>>>
>>> I appreciate any help on the following two (related?) problems (further
>>> explained below):
>>>
>>>1. The "Smart Data Loader" plugin fails in case Array Type is
>>>present in one of the tables (error unknown data type)
>>>2. The "Feature Templating" plugin does not handle data from columns
>>>with Array Type correctly ("[Ljava.lang.String;@..."
>>><[Ljava.lang.String;@...>)
>>>
>>> Of particular importance to me is to solve problem 2, as this directly
>>> affects geoserver output.
>>>
>>> Many thanks in advance,
>>>
>>> Henning
>>>
>>> -
>>>
>>> Problem 1:
>>>
>>>- I create two tables, one without and one without a column of Array
>>>Type (called here "noarray_table" and "array_table"; only for explanation
>>>instead of my more complex setup):
>>>
>>> CREATE TABLE test.noarray_table (
>>> id SERIAL PRIMARY KEY,
>>> geometry geometry(point, 4326),
>>> attribute1 varchar,
>>> 

Re: [Geoserver-users] Smart Data Loader and Feature Templating plugins fail to work with Array Type (PostgreSQL)

2022-09-13 Thread Henning Lorenz

Hi Nuno,

Thinking about your reply, I can't bring it in line with the 
documentation and my observations, because I don't create array 
attributes with App Schema:


 * A column with Array Type is defined in PostgreSQL, i.e. the database
   query returns an array to Geoserver
 * The Feature Templating documentation that I linked earlier clearly
   refers to Array Type in databases (i.e. the situation in my case, if
   I do not completely misunderstand)
 * Feature Templating produces a "[Ljava.lang.String;@..." error
 * My web searches suggest that a "[Ljava.lang.String;@..." error
   indicates that an array is passed to a function that expects string
   only, which suggests that App Schema correctly passes on the Array
   Type data to Feature Templating, but Feature templating doesn't
   understand it in contradiction to the documentation.

A first step would be to decide whether I am unable to interpret the 
documentation correctly. Then to think what resources are needed for 
full array support and how to get them (I'd like to have a bag of money 
for this, but I don't ...).


Best wishes,

Henning


On 2022-09-13 00:11, Nuno Oliveira wrote:

Hi Henning,
that's a good point, if my memory serves me well, if an array reaches 
features-templating it will work as described (this is used for some 
advanced integrations with features-templating), but I don't think 
that App-Schema and Smart Data Loader can produce array attributes.


So summarizing:

  * Features-templating support arrays,
  * but you cannot produce array attributes with App-Schema or Smart
Data Loader,
  * hence you can't use arrays unless you create them programmatically.

@Marco Volpini  did I miss 
something?


Kind regards,
Nuno Oliveira




On Fri, Sep 9, 2022 at 12:27 PM Henning Lorenz 
 wrote:


Dear Nuno,

Thanks for the quick reply. However, for the Feature Templating
plugin, it contradicts the documentation where Array Type support
for json output is explicitly mentioned:

https://docs.geoserver.org/stable/en/user/community/features-templating/directives.html#array-based-properties-json-based-templates-only

Is the documentation wrong and needs to be updated?

Best wishes,

Henning


On 2022-09-09 11:42, Nuno Oliveira wrote:

Dear Henning,
those modules do not support array column types, this would be a
nice feature to have.

A pull request contributing it would be very welcomed, you may
also want to check the GeoServer Support
 in case you want to fund it.

Kind regards,
Nuno Oliveira

On Fri, Sep 9, 2022 at 10:13 AM Henning Lorenz
 wrote:

geoserver 2.21, app schema/smart data loader/ogc api/feature
templating plugins (Tomcat 9 on Ubuntu 22.04; openjdk 11.0.16)

Hello,

I appreciate any help on the following two (related?)
problems (further explained below):

 1. The "Smart Data Loader" plugin fails in case Array Type
is present in one of the tables (error unknown data type)
 2. The "Feature Templating" plugin does not handle data from
columns with Array Type correctly
("[Ljava.lang.String;@..." )

Of particular importance to me is to solve problem 2, as this
directly affects geoserver output.

Many thanks in advance,

Henning

-

Problem 1:

  * I create two tables, one without and one without a column
of Array Type (called here "noarray_table" and
"array_table"; only for explanation instead of my more
complex setup):

CREATE TABLE test.noarray_table (
    id SERIAL PRIMARY KEY,
    geometry geometry(point, 4326),
    attribute1 varchar,
    attribute2 varchar
);

CREATE TABLE test.array_table (
    id SERIAL PRIMARY KEY,
    geometry geometry(point, 4326),
    attribute1 varchar,
    attribute2 varchar[]
);

  * After adding some data, I create a PostGIS data store for
database that contains the tables.
  * When this is done, I add a new data store and select
"Smart Data Loader".
  o When I select the noarray_table as root entity, I get
the expected preview and can add the data store.
  o However, when I select the array_table, I get an
error message over the entire page. As far as I can
tell, the critical line is "Caused by:
java.lang.RuntimeException: Attribute type '_varchar'
is unknown.". _varchar is the same as varchar[] as
far as I can tell.

Is this