Tampilkan postingan dengan label OGC. Tampilkan semua postingan
Tampilkan postingan dengan label OGC. Tampilkan semua postingan

Selasa, 03 Januari 2012

WFS for the masses: adding support for paging and sorting in GeoServer

Today we are going to introduce you our latest contribution to GeoServer, WFS paging and sorting for retrieving features.

First off, let's take a step back and see what sorting and paging support is available in the official OGC protocols:
  • Neither WMS 1.1 nor WMS 1.3 (or SLD/SE for that matter), have any ability to order the results so that features are painted in a certain order. If features can be organized in categories filters and FeatureTypeStyle elements can do the trick, but that won't work over continous fields
  • Same goes for WPS 1.0, which can return significant amounts of vector data that might be useful to page over
  • WFS 1.0 does not support either, WFS 1.1 supports sorting, WFS 2.0 supports sorting and paging via the sortBy and startIndex/maxFeature parameters
The last stable GeoServer release does not support WFS 2.0, and allows for sorting only on DBMS based stores. In our latest contribution to the stable series we removed all limitations concerning WFS paging and sorting support:
  • WFS 1.0 and 1.1 can now support sorting on top of each and every store kind, using the sortBy parameter as a vendor extension
  • WFS 1.0 and 1.1 support paging on top of each and every store, using the startIndex/maxFeatures parameters
Protocol and paging wise we back-ported the work added on trunk along with WFS 2.0 support, and then we merged in some previous work on generic sorting we did for the aggregating store.

Technically speaking, in case the store does not support sorting natively (e.g., shapefile) we gather the features into an optimized merge/sort algorithm that never keeps more than 1000 features in memory, and uses secondary storage to scale up to larger result sets.

But, enough talking, let's see some examples against the states demo layer, using the CSV as the output format for brevity.

First ten features:
http://localhost:8080/geoserver/topp/owsservice=WFS&version=1.0.0&request=GetFeature
&typeName=topp:states&outputFormat=csv&propertyName=STATE_NAME,PERSONS
&maxFeatures=10

FID,STATE_NAME,PERSONS
states.1,Illinois,11430602
states.2,District of Columbia,606900
states.3,Delaware,666168
states.4,West Virginia,1793477
states.5,Maryland,4781468
states.6,Colorado,3294394
states.7,Kentucky,4551524
states.8,Kansas,2477574
states.9,Virginia,6180651
states.10,Missouri,5117073

The next 10 features:
http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature
&typeName=topp:states&outputFormat=csv&propertyName=STATE_NAME,PERSONS
&maxFeatures=10&startIndex=10

FID,STATE_NAME,PERSONS
states.11,Arizona,3665228
states.12,Oklahoma,3145585
states.13,North Carolina,6628629
states.14,Tennessee,4829958
states.15,Texas,17122020
states.16,New Mexico,1379559
states.17,Alabama,4040587
states.18,Mississippi,2573216
states.19,Georgia,6457339
states.20,South Carolina,3486703

The first ten states with most people (sort on PERSONS, descending):
http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature
&typeName=topp:states&outputFormat=csv&propertyName=STATE_NAME,PERSONS
&maxFeatures=10&sortBy=PERSONS%20D

FID,STATE_NAME,PERSONS
states.47,California,29760021
states.39,New York,18235907
states.15,Texas,17122020
states.23,Florida,12937926
states.40,Pennsylvania,11881643
states.1,Illinois,11430602
states.48,Ohio,9980887
states.24,Michigan,9295297
states.43,New Jersey,7484736
states.13,North Carolina,6628629

The second page of the above result set:
http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature
&typeName=topp:states&outputFormat=csv&propertyName=STATE_NAME,PERSONS
&maxFeatures=10&startIndex=10&sortBy=PERSONS%20D

FID,STATE_NAME,PERSONS
states.19,Georgia,6457339
states.9,Virginia,6180651
states.37,Massachusetts,6016425
states.44,Indiana,5544159
states.10,Missouri,5117073
states.49,Washington,4866692
states.14,Tennessee,4829958
states.30,Wisconsin,4796441
states.5,Maryland,4781468
states.7,Kentucky,4551524

These modifications are already available in the GeoServer 2.1.3 release.

There is more work to be done in this area, ordering features before paiting them in WMS, and paging WPS results would both be nice additions. Interested? Let us know!

The GeoSolutions team,

Senin, 15 November 2010

GeoSolutions helps GeoServer WPS going mainstream

GeoSolutions is funding Andrea Aime's time to bring the GeoServer Web Processing Service (WPS) module to become an officially supported extension. A proposal has been submitted and is being voted on by the Project Steering Committe; you can track the progress here.

For those who have no idea of what WPS means I can cite part of the description I have found in wikipedia, which is very informative:
"The (WPS) is designed to standardize the way that GIS calculations are made available to the Internet. WPS can describe any calculation (i.e. process) including all of its inputs and outputs, and trigger its execution as a Web Service. WPS supports simultaneous exposure of processes via HTTP GET, HTTP POST, and SOAP, thus allowing the client to choose the most appropriate interface mechanism. The specific processes served up by a WPS implementation are defined by the owner of that implementation. Although WPS was designed to work with spatially referenced data, it can be used with any kind of data.
WPS makes it possible to publish, find, and bind to processes in a standardized and thus interoperable fashion. Theoretically it is transport/platform neutral (like SOAP), but in practice it has only been specified for HTTP.
WPS defines three operations:
  1. GetCapabilities returns service-level metadata
  2. DescribeProcess returns a description of a process including its inputs and outputs
  3. Execute returns the output(s) of a process"
GeoSolutions plans for the WPS module in GeoServer extend beyond simply making it an official extension; in the short term we intend to publish a set of processes that we have developed for FAO which will add support for sophisticated statistics on both raster and vector data as well as other more specific processes (raster crop by polygon to name one).
In the longer term our goals include the following items:
  • Exposing GDAL utilities (e.g. gdalinfo) as WPS processes
  • Exposing Octave functions as WPS processes
  • Exposing IDL routines as WPS processes
  • Raster Algebra support via JAI-Tools
  • Improving support for grid processing
  • Improving support for clustered processing for superior scalability
Stay tuned for more information and, if you want to know more, you can always contact us directly!
The GeoSolutions team.

Senin, 08 November 2010

WorldFile explained (or at least we tried!)

There is a lot of confusion around about what world file represents therefore we thought it would have been nice to put together a couple of clarifications.


The World File
World File is a de-facto standard from early days of ESRI desktop GIS applications. Originally it was composed by at least two files, a raster file, let' say a file.tiff,  and another file (most part of the times called file.wld)  that contains numbers that define the affine transformation between the image and the target spatial reference system. This implicitly means that we are talking about georectified raster data. This wld file is what should be properly called the world file. Other extensions that could be used on behalf of tfw are wld tifw, etc... Moreover some other formats beside tif can be used, like gif, png, jpeg, jpeg2000, etc..and the extensions for the world file become pretty fancy (gifw, pgw, etc..).

The concept behind this couple is as follows. An image (e.g. a tif) plus its world file represent a geospatial georectified raster in some spatial coordinate reference system (CRS). The mapping between the raster space (the intrinsic Image space of rows and cols) and the associated model space is represented by an affine transformation whose coeffficients are contained inside the accompanying world file (see here ). This way, practically any image format can be made spatial-aware just adding a world file containing an affine transform that maps image points onto a crs. Here is a good explanation of what a world file contains.

The Projection File
One would now ask, ok, but what coordinate reference system I am supposed to use. The best answer would be "the one the person who produces the image + the world file was using"! Seriously many people make assumptions on the CRS used for the georeferencing affine transform contained in the world file, but in fact this can lead to all sort of problems. The best way to transmit the information about the spatial coordinate reference system is providing a third file with extension prj which contains the well known text (WKT more info can be found here) representation of the user spatial CRS. The Spatial Reference website can be extremely useful for associating the proper WKT to a certain CRS.


Recommendation
Notice that usually the raster space has x going right and y going down while in model space things DEPEND on the spatial CRS, specifically, axes order and axes directions!
ALWAYS ASK YOUR DATA PROVIDER TO DESCRIBE EXACTLY THE SPATIAL COORDINATE REFERENCE SYSTEM THAT WAS USED TO GEOREFERENCE YOUR DATA.

The GeoSolutions Team,

Kamis, 11 Februari 2010

Notizie dal FOSS4G-IT 2010 Lugano

Scriviamo dall’aula magna della Scuola Università Professionale della Svizzera Italiana (SUPSI) che gentilmente ospita presso le sue strutture l’edizione 2010 del FOSS4G-IT.
Di seguito pubblichiamo uno scatto della giornata di ieri, la giornata dedicata ai workshop, tipicamente il momento nel quale gli ‘esperti’ del campo condividono le loro conoscenze per la formazione.

WorkShop di GeoSolutions al FOSS4G-IT 2010

GeoSolutions, tramite Alessio Fabiani e Simone Giannecchini, core developers di Geoserver, GeoTools, GeoBatch e ImageIO-Ext, hanno messo a disposizione dei partecipanti le loro conoscenze di sviluppatori del Geoserver in tre intense ore di formazione di base e non solo.
E’ stata un’ottima occasione sia per noi di testare le nostre capacità formative, attività mai semplice e che richiede elevata professionalità ed un continuo rinnovamento delle tematiche trattate e del materiale formativo; sia per i partecipanti che hanno potuto sfruttare una corsia preferenziale per entrare nel mondo del Geoserver e della disseminazione dei dati geografici con standard OGC.
Il live-DVD prodotto per il workshop verrà presto messo a disposizione di tutte le persone che desiderano provare in maniera semplice, nessuna installazione richiesta, Geoserver ed altri software GIS.
Un ringraziamento particolare a Massimiliano Cannata ed all’Istituto di Scienze della Terra di Lugano (D.A.C.D).

Jumat, 22 Januari 2010

GeoServer workshop at FOSS4G-IT

Sorry, this is a post for the Italian-speaking users.

Salve a tutti, siamo lieti di annunciare che l'Ing. Alessio Fabiani e l'Ing Simone Giannecchini saranno presenti al FOSS4G-IT anche noto come 'XI meeting degli utenti di lingua italiana di GRASS e GFOSS', con un workshop ed una presentazione su GeoServer (programma)
I contenuti del workshop sono descritti qui sotto.

GeoServer è un server geospaziale ricco di funzionalità avanzate, concepito ed implementato per supportare standard OGC, quali WMS, WFS e WCS.
Scopo di questo workshop e' fornire all'utente una panoramica delle funzionalita' offerte dal Geoserver per la gestione e la pubblicazione di dati geospaziali, corredando le spiegazioni teoriche con esempi pratici.
I partecipanti impareranno a ingerire, configurare e pubblicare dati in formati diversi, quali ad esempio Shapefile o GeoTIFF, concentrandosi principalmente sulle funzionalita' di generazione di mappe; ai partecipanti sarà fornita una introduzione approfondita al motore di styling di GeoServer, basato sullo standard OGC denominato Styler Layer Descriptor (SLD), attraverso alcuni esempi validi sia per i dati raster che vettoriali, toccando funzionalita' avanzate come le opzioni di complex labeling e l'utilizzo di simbologie dinamiche. Tempo permettendo altri argomenti trattati saranno Tile caching con GeoWebCache, ottimizzazione delle immagini WMS a palette e il di watermarking.
Si dara' spazio al supporto avanzato per output KML e quindi alla integrazione con Google Earth. Verrà illustrato come pubblicare dati da GeoServer in Google Earth, introducendo funzionalità avanzate di KML come regionation, templating, time animations etc.
A seguito si introdurra' l'utilizzo dei servizi WFS e WCS per la disseminazione di dati vettoriali e raster in formato nativo, non renderizzato.
Infine, si faranno cenni agli sviluppi in essere nella comunita' di GeoServer, quali ad esempio il supporto per i parametri TIME ed ELEVATION in WMS e WCS o la persistenza su database della configurazione interna.
Il titolo della presentazione e':

Introduzione a Geoserver e sviluppi in corso per la gestione e pubblicazione di dati per la modellazione del cambiamento climatico.

Questa presentazione si prefigge un duplice scopo: da un lato fornire allo spettatore una introduzione delle funzionalità offerte da GeoServer per la creazione di Spatial Data Infrastructure interoperabili, tenendo anche in considerazione i dettami di INSPIRE, mentre dall'altro lato mira ad introdurre e presentare gli sviluppi più recenti e quelli in cantiere riguardanti il management e la disseminazione di dati MetOc (Meteorologici ed Oceanografici) e di Remote Sensing, di particolare interesse per la comunità scientifica internazionale nell'ambito di studi ed applicazioni sul Climate Change.
In particolare verranno presentate e discusse le problematiche e gli sviluppi in corso relativi alla gestione coerente di dati raster multidimensionali in GeoServer utilizzando servizi OGC compliant e non. Il tutto in modo da permettere agli utenti un accesso il più flessibile possibile che contempli sia la gestione del tempo che di elevazione-profondità delle bande acquisite-prodotte.
Si farà inoltre riferimento agli sviluppi in corso su questi temi a livello GeoTools che rappresentano il risultato di uno sforzo di cooperazione uDig-GeoServer il cui obiettivo è di migliorare l'integrazione fra i due software sia in termini di riuso del codice che, soprattutto, in termini di funzionalità aggiuntive per il management ed il processing di dati raster e non. A tale scopo verranno mostrate le nuove funzionalità implementate in uDig per la visualizzazione, navigazione ed interrogazione di dati multitemporali e multilayers.
Quindi, ci vediamo a Lugano!