Re: [Geoserver-users] Publish PostGIS data without Geometry

2015-06-17 Thread Ben Caradoc-Davies
Richard,

if you configure a layer with a fake bounding box and a fake CRS (e.g 
EPSG:4326), GeoServer WFS should happily serve all your non-spatial 
data. You can to obtain JSON with WFS using outputformat=json and all 
the usual GeoServer WFS property filtering. Features are just rows in 
your source table. JSONP is also supported but disabled by default.

Types without geometries will not work with WMS, but that is expected.

Kind regards,
Ben.

On 17/06/15 18:20, Bischof, Richard wrote:
> Hi there,
>
> I'm using PostGIS as my data store and geoserver to access the data.
>
> In my PostGIS structure are different tables, some with geoinformation, but 
> some without as well (relationships, tags, etc).
> I want to access all the data in a web-application via services. For geodata 
> i'm using wfs-t, but the question is, how to access the normal data in a 
> clean json representation.
>
> Is there an option, to publish a postgis table via geoserver in a simple not 
> feature-type way?
>
> Thanks, Richard
>
>
> --
> ___
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

-- 
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand

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


Re: [Geoserver-users] image mosaic with GeoServerRESTPublisher

2015-06-17 Thread Daniele Romagnoli
Hi Dominique,
I was able to configure an imageMosaic on your sample dataset without
changing any line of code.

A couple of notes on the issues you had.
Why are you using both asc and TIFF files on the mosaic?
Note that your ascii files aren't properly formed. They define a
NO_DATA_VALUE field in the header whilst it should be NODATA_VALUE [1].
This results into the reader being unable to parse it. Also note that they
don't have CoordinateReferenceSystem definition so you should consider
adding a PRJ beside them.

Once removing them from the mosaic folder, I found the other issue:
Your time regex isn't matching the times defined in the filename.

If your file name is "133_2015-06-12T03_00_00.000Z.tif", then the timeregex
you specified won't match that (I'm reporting my notes based on the files
you have attached to the email):
regex = [0-9]{8}T[0-9]{9}Z(\\?!.\\*[0-9]{8}T[0-9]{9}Z.\\*)

I have renamed your files as:
133_20150612T00Z.tif which contains an ISO8601 time format and
specified that regex:
regex=[0-9]{8}T[0-9]{6}Z
Which worked.

Alternatively, if you can't change your file names, you can instruct the
time parser to use a custom format.
As an instance, in order to deal with your attached files:
133_2015-06-12T03_00_00.000Z.tif
you may set this content into the timeregex.properties:
regex=[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}_[0-9]{2}_[0-9]{2}.[0-9]{3}Z
*,format=-MM-dd'T'HH_mm_ss.SSS'Z'*

Note the regex is containing time split into pieces, due to the presence of
dashes and underscores on your file name.
Then, there is a "format=-MM-dd'T'HH_mm_ss.SSS'Z'" section in order to
instruct the parser that the time is formatted that way, so 4 digits for
the year, a dash sign, 2 digits for the month, a dash sign.
then a T char, 2 digits for the hour, an underscore and so on.
The "format" option can be added to a time regex property to deal with
times which aren't ISO8601 formatted.

Hope this helps.
Please, let us know if you still have issues.

Cheers,
Daniele
















[1]: https://en.wikipedia.org/wiki/Esri_grid#ASCII



On Tue, Jun 16, 2015 at 7:10 PM, Bessette-Halsema, Dominique E <
dominique.besse...@gdit.com> wrote:

>  I looked at the geotools code in the gt-imagemosaic module and the
> GridFormatFinder is reading the indexer.properties file as a NetCDF file.
> I added the line logExcludes.contains(extension) to the If check in the
> ImageMosaicWalker class line 156 and that fixed that issue.  I also had to
> use the indexer.xml file instead of the indexer.properties file otherwise
> the customformat object in the TimestampFileNameExtractor is null and
> another error was thrown.
>
>
>
> ImageMosaicWalker.java
>
>
>
> *if* (*logExcludes**.contains(extension)* || (format
> *instanceof* *UnknownFormat*) || format == *null*) {
>
> *if* (!*logExcludes*.contains(extension)) {
>
> eventHandler.fireFileEvent(Level.*INFO*,
> fileBeingProcessed, *false*, "Skipped file "
>
> + fileBeingProcessed + ": File format is not
> supported.",
>
> ((fileIndex * 99.0) / numFiles));
>
> }
>
> *return*;
>
> }
>
>
>
> I also had to update the org.geotools.data.DataUtilities class  createType
> method because it was parsing my feature name incorrectly, but I am
> assuming that’s a naming convention I need to fix.
>
>
>
> After these simple updates I can now see the correct attributes in the gis
> table, and the time dimension in the get capabilities document.
>
>
>
> Dom
>
>
>
> *From:* dany.geoto...@gmail.com [mailto:dany.geoto...@gmail.com] *On
> Behalf Of *Daniele Romagnoli
> *Sent:* Tuesday, June 16, 2015 9:02 AM
> *To:* Bessette-Halsema, Dominique E
> *Cc:* Mike Grogan; geoserver-users@lists.sourceforge.net
>
> *Subject:* Re: [Geoserver-users] image mosaic with GeoServerRESTPublisher
>
>
>
> Hi Dominique,
>
> I'll also take a look on this during the week to figure out what is going
> on.
>
> Anyway, note that if you remove the indexer properties file to let the
> ImageMosaic work, the TIME dimension won't be taken into account as
> expected. There is no way to have the time dimension properly set if the
> indexer is unavailable since it's the indexer itself which contains
> instructions for the imageMosaic on how to retrieve the time values.
> Wondering if there is any problem in parsing the regexes you have specified.
>
>
>
> Hope this helps.
>
> Cheers,
>
> Daniele.
>
>
>
> On Tue, Jun 16, 2015 at 5:31 PM, Bessette-Halsema, Dominique E <
> dominique.besse...@gdit.com> wrote:
>
> I’m going through the geotools code to figure it out.  If I come up with a
> solution I’ll post it
>
>
>
> Thanks
>
> Dom
>
>
>
> *From:* Mike Grogan [mailto:d.michael.gro...@gmail.com]
> *Sent:* Tuesday, June 16, 2015 8:04 AM
>
>
> *To:* Bessette-Halsema, Dominique E
> *Cc:* geoserver-users@lists.sourceforge.net
> *Subject:* Re: [Geoserver-users] image mosaic with GeoSer

Re: [Geoserver-users] CQL and Time queries

2015-06-17 Thread Mario Basa
Hello Jim,

Yes, I am getting the correct results with the little work-around.

Thanks a lot.

Mario.


On Tue, Jun 16, 2015 at 1:29 AM, Jim Hughes  wrote:

>  Hi Mario,
>
> As a quick guess, I'd suppose that those two date strings are being parsed
> by slightly different code.  If someone knows for sure, they can chime in.
>
> I might be able to look at it some more later.  At the minute, do you have
> a sufficient work-around/understanding to make progress?
>
> Cheers,
>
> Jim
>
>
> On 06/15/2015 11:53 AM, Mario Basa wrote:
>
> Thank you very much Jim.
>
>  Yes, I am in Tokyo right now so it is UTC/GMT +9 for us here.
>
>  For some reason, this works:
>
>  intime BETWEEN '2011/03/11 23:01:26' and '2011/03/11 23:09:12'
>
>  and returns the correct desired results even without the 'Z'.
>
>  Still can not understand why this gives the wrong results:
>
>  intime BETWEEN '2011-03-11 23:01:26' and '2011-03-11 23:09:12'
>
>
>  Mario.
>
>
> On Mon, Jun 15, 2015 at 3:21 AM, Jim Hughes  wrote:
>
>>  Hi Mario,
>>
>> From a quick peek at the docs for ECQL(*), you can specify a 'date-time'
>> by giving the date, the letter 'T', and then the UTC time.
>>
>> Example filters:
>> dtg BETWEEN '-01-01T00:00:00.000Z' AND '-12-31T23:59:59.000Z'
>> or
>> dtg DURING 2010-08-08T00:00:00.000Z/2010-08-08T23:59:59.000Z
>>
>> By chance is your timezone 9 hours off of UTC?  The code for dateParse
>> delegates to SimpleDateFormat.parse here:
>> https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_dateParse.java#L73-75.
>>
>>
>> Cheers,
>>
>> Jim
>>
>> *
>> https://github.com/geotools/geotools/blob/master/modules/library/cql/ECQL.md
>>
>>
>> On 06/13/2015 12:12 AM, Mario Basa wrote:
>>
>>  Hello,
>>
>>  I am having strange results whenever I do time filters with similar to
>> the  CQL:
>>
>>  intime > dateParse('-MM-dd HH:mm:ss','2011-03-11 22:23:31')  and
>> intime < dateParse('-MM-dd HH:mm:ss','2011-03-11 22:58:51')
>>
>>  wherein I would get features that are in the '2011-03-11 13:00:00' time
>> range. I tried also the BETWEEN ... AND keywords and got similar strange
>> results.
>>
>>  Is there a proper way of writing CQL filters with timestamps beside the
>> one I am doing?
>>
>>  Thanks.
>>
>>  Mario.
>>
>>
>>  
>> --
>>
>>
>>
>> ___
>> Geoserver-users mailing 
>> listGeoserver-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>>
>>
>> --
>>
>> ___
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
>
--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Publish PostGIS data without Geometry

2015-06-17 Thread Paolo Corti
> On 17/06/15 18:20, Bischof, Richard wrote:
>> Hi there,
>>
>> I'm using PostGIS as my data store and geoserver to access the data.
>>
>> In my PostGIS structure are different tables, some with geoinformation, but 
>> some without as well (relationships, tags, etc).
>> I want to access all the data in a web-application via services. For geodata 
>> i'm using wfs-t, but the question is, how to access the normal data in a 
>> clean json representation.
>>
>> Is there an option, to publish a postgis table via geoserver in a simple not 
>> feature-type way?
>>
>> Thanks, Richard

Hello Richard
I don't think GeoServer is the right tools to provide a REST API for
your tables.
You could expose your tables with a web framework such as Django or
Flask or others
regards
p

-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti

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


Re: [Geoserver-users] image mosaic with GeoServerRESTPublisher

2015-06-17 Thread Bessette-Halsema, Dominique E
I’m not sure what the issue is.  I edited my timeregex.propeties file to 
include the format, and correct regex.  I also updated directory to remove the 
ascii files, to have the correct timeregex in the tiff filename, and I still 
get issues with the indexer.properties file.  I traced the geotools code and 
heres what ive found:



The code throws an error in the AciiGridsImageReaderSpi.class when it tries to 
decode the indexer.properties file as AsciiGridRasterType and parse the header, 
line 215.



  // Now, I have an ImageInputStream and I can try to see if input 
can be

  // decoded by doing header parsing

  // 
/

  try {



 // Header Parsing to check if it is an EsriAsciiGridRaster

 asciiRaster = 
AsciiGridRaster.AsciiGridRasterType.ESRI.createAsciiGridRaster(spiImageInputStream);

 asciiRaster.parseHeader();



I’m not sure why the ImageMosaicWalker class is even trying to read in 
*.properties files.  If I add a line of code in the ImageMosaicWalker class to 
skip files with properties or xml extensions then everything works fine.  Maybe 
I’m using a different version of geotools, or have different plugins then what 
you are testing with but I cant get it to work without that “skip” line of code.



Thanks for your help

Dominique



From: dany.geoto...@gmail.com [mailto:dany.geoto...@gmail.com] On Behalf Of 
Daniele Romagnoli
Sent: Wednesday, June 17, 2015 2:21 AM
To: Bessette-Halsema, Dominique E
Cc: Mike Grogan; geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] image mosaic with GeoServerRESTPublisher



Hi Dominique,

I was able to configure an imageMosaic on your sample dataset without changing 
any line of code.



A couple of notes on the issues you had.

Why are you using both asc and TIFF files on the mosaic?

Note that your ascii files aren't properly formed. They define a NO_DATA_VALUE 
field in the header whilst it should be NODATA_VALUE [1].

This results into the reader being unable to parse it. Also note that they 
don't have CoordinateReferenceSystem definition so you should consider adding a 
PRJ beside them.



Once removing them from the mosaic folder, I found the other issue:

Your time regex isn't matching the times defined in the filename.



If your file name is "133_2015-06-12T03_00_00.000Z.tif", then the timeregex you 
specified won't match that (I'm reporting my notes based on the files you have 
attached to the email):

regex = 
[0-9]{8}T[0-9]{9}Z(\\?!.\\*[0-9]{8}T[0-9]{9}Z.\\*)



I have renamed your files as:

133_20150612T00Z.tif which contains an ISO8601 time format and specified 
that regex:

regex=[0-9]{8}T[0-9]{6}Z

Which worked.



Alternatively, if you can't change your file names, you can instruct the time 
parser to use a custom format.

As an instance, in order to deal with your attached files: 
133_2015-06-12T03_00_00.000Z.tif

you may set this content into the timeregex.properties:

regex=[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}_[0-9]{2}_[0-9]{2}.[0-9]{3}Z,format=-MM-dd'T'HH_mm_ss.SSS'Z'



Note the regex is containing time split into pieces, due to the presence of 
dashes and underscores on your file name.

Then, there is a "format=-MM-dd'T'HH_mm_ss.SSS'Z'" section in order to 
instruct the parser that the time is formatted that way, so 4 digits for the 
year, a dash sign, 2 digits for the month, a dash sign. then a T 
char, 2 digits for the hour, an underscore and so on.

The "format" option can be added to a time regex property to deal with times 
which aren't ISO8601 formatted.



Hope this helps.

Please, let us know if you still have issues.



Cheers,

Daniele

































[1]: https://en.wikipedia.org/wiki/Esri_grid#ASCII







On Tue, Jun 16, 2015 at 7:10 PM, Bessette-Halsema, Dominique E 
mailto:dominique.besse...@gdit.com>> wrote:

I looked at the geotools code in the gt-imagemosaic module and the 
GridFormatFinder is reading the indexer.properties file as a NetCDF file.  I 
added the line logExcludes.contains(extension) to the If check in the 
ImageMosaicWalker class line 156 and that fixed that issue.  I also had to use 
the indexer.xml file instead of the indexer.properties file otherwise the 
customformat object in the TimestampFileNameExtractor is null and another error 
was thrown.



ImageMosaicWalker.java



if (logExcludes.contains(extension) || (format instanceof 
UnknownFormat) || format == null) {

if (!logExcludes.contains(extension)) {

eventHandler.fireFileEvent(Level.INFO, fileBeingProcessed, 
false, "Skipped file "

+ fileBeingProcessed + ": File format is not 
supported.",

((fileIndex * 99.0) / numFiles));

}

return;

}



I also had to update t

[Geoserver-users] Help with tuning performances

2015-06-17 Thread simone gadenz
Hello!

Hope anybody can help in improving the response time for a WMS working on a 
PostGIS table with 1 million point spread around Italy. The viewer use leaflet 
and consumes the layer as WMS. The system was developer to display over a 
website but now I need to display over a 55 inch touch screen completely 
offline. I setup a Virtualbox machine and use that as a local server. The 
virtual machine uses 8Gb of the total 16GB, the processor is an i7.

Each point of the layer has the same symbol generated from an image icon. The 
layer is displayed for layers greater than 12 and the first tile load takes 12 
to 15 seconds, then it gets quicker to represent tiles. The points are on a 
PostGIS layer, spatial index built. 
The geometry of the original table is 4326, the display is over OSM. 

I tried to follow some of the hints for improving the performance of the 
server, and it is better than the beginning, but I think there is still room 
for improvements.

Using precaching might become complicated because the map might request WMS 
with some filter expression during the requests on that layer.

Any help, idea or suggestion is welcome.

Cheers.

Simone





Simone Gadenz
BEECOME S.R.L. 
Via Sansedoni 7, 53100 SIENA - ITALY
Phone/Fax: +39 0577 588408
www.beecome.it
sim...@beecome.it
---
Informativa Privacy - Ai sensi del D. Lgs n. 196/2003 (Codice Privacy) si 
precisa che le informazioni contenute in questo messaggio sono riservate e ad 
uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse 
pervenuto per errore, La preghiamo di eliminarlo senza copiarlo e di non 
inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.

Privacy Information - This message, for the D. Lgs n. 196/2003 (Privacy Code), 
may contain confidential and/or privileged information. If you are not the 
addressee or authorized to receive this for the addressee, you must not use, 
copy, disclose or take any action based on this message or any information 
herein. If you have received this message in error, please advise the sender 
immediately by reply e-mail and delete this message. Thank you for your 
cooperation.



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


[Geoserver-users] Remove geometry from gml output WMS

2015-06-17 Thread Leonardo Dobles
HI

Is there a way to remove geometry field from the gml output in the WMS
getfeatureinfo method?

Thanks in advance

Leonardo
--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Remove geometry from gml output WMS

2015-06-17 Thread Martin Davis
You might find this recent thread applicable:
http://osgeo-org.1560.x6.nabble.com/Reduce-Geometry-size-in-GetFeatureInfo-responses-td5210228.html

On Wed, Jun 17, 2015 at 3:23 PM, Leonardo Dobles 
wrote:

> HI
>
> Is there a way to remove geometry field from the gml output in the WMS
> getfeatureinfo method?
>
>
--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Help with tuning geoserver for 1 million PostGIS table

2015-06-17 Thread simone gadenz
Hello!

Hope anybody can help in improving the response time for a WMS working on a 
PostGIS table with 1 million point spread around Italy. The viewer use leaflet 
and consumes the layer as WMS. The system was developer to display over a 
website but now I need to display over a 55 inch touch screen completely 
offline. I setup a Virtualbox machine and use that as a local server. The 
virtual machine uses 8Gb of the total 16GB, the processor is an i7.

Each point of the layer has the same symbol generated from an image icon. The 
layer is displayed for layers greater than 12 and the first tile load takes 12 
to 15 seconds, then it gets quicker to represent tiles. The points are on a 
PostGIS layer, spatial index built. 
The geometry of the original table is 4326, the display is over OSM. 

I tried to follow some of the hints for improving the performance of the 
server, and it is better than the beginning, but I think there is still room 
for improvements.

Using precaching might become complicated because the map might request WMS 
with some filter expression during the requests on that layer.

Any help, idea or suggestion is welcome.

Cheers.

Simone

Simone Gadenz
BEECOME S.R.L. 
Via Sansedoni 7, 53100 SIENA - ITALY
Phone/Fax: +39 0577 588408
www.beecome.it
sim...@beecome.it
---
Informativa Privacy - Ai sensi del D. Lgs n. 196/2003 (Codice Privacy) si 
precisa che le informazioni contenute in questo messaggio sono riservate e ad 
uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse 
pervenuto per errore, La preghiamo di eliminarlo senza copiarlo e di non 
inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.

Privacy Information - This message, for the D. Lgs n. 196/2003 (Privacy Code), 
may contain confidential and/or privileged information. If you are not the 
addressee or authorized to receive this for the addressee, you must not use, 
copy, disclose or take any action based on this message or any information 
herein. If you have received this message in error, please advise the sender 
immediately by reply e-mail and delete this message. Thank you for your 
cooperation.



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