[Geoserver-devel] A (toy) datastore based on catalog contents

Hi,
remember some months ago, while we were discussing the improved catalog API, I suggested that it would have been possible to create a datastore on top of the catalog API?

Well, last Sunday I had a spare hour and worked a bit on it, creating the really bare minimum version of the store that generates features out of layers.
Here is a screenshot out of openlayers (I have many worldwide layers, so not that interesting):

Inline image 1

and here is an excerpt of the GML output:

gml:featureMember

<nurc:layers fid=“layers.LayerInfoImpl–570ae188:124761b8d78:-7fcc”>

nurc:workspacetiger</nurc:workspace>
nurc:nametiger_roads</nurc:name>
nurc:titleManhattan (NY) roads</nurc:title>

nurc:abstract
Highly simplified road layout of Manhattan in New York…
</nurc:abstract>

nurc:bounds

<gml:Polygon srsName=“http://www.opengis.net/gml/srs/epsg.xml#4326”>

gml:outerBoundaryIs

gml:LinearRing

<gml:coordinates xmlns:gml=“http://www.opengis.net/gml” decimal=“.” cs=“,” ts=" ">
-74.02722,40.684221 -73.907005,40.684221 -73.907005,40.878178 -74.02722,40.878178 -74.02722,40.684221
</gml:coordinates>

</gml:LinearRing>

</gml:outerBoundaryIs>

</gml:Polygon>

</nurc:bounds>

</nurc:layers>

</gml:featureMember>

gml:featureMember

<nurc:layers fid=“layers.LayerInfoImpl–570ae188:124761b8d78:-7fca”>

nurc:workspacesf</nurc:workspace>
nurc:namearchsites</nurc:name>
nurc:titleSpearfish archeological sites</nurc:title>

nurc:abstract
Sample data from GRASS, archeological sites location, Spearfish, South Dakota, USA
</nurc:abstract>

nurc:bounds

<gml:Polygon srsName=“http://www.opengis.net/gml/srs/epsg.xml#4326”>

gml:outerBoundaryIs

gml:LinearRing

<gml:coordinates xmlns:gml=“http://www.opengis.net/gml” decimal=“.” cs=“,” ts=" ">
-103.87256379,44.37740331 -103.63794182,44.37740331 -103.63794182,44.48804281 -103.87256379,44.48804281 -103.87256379,44.37740331
</gml:coordinates>

</gml:LinearRing>

</gml:outerBoundaryIs>

</gml:Polygon>

</nurc:bounds>

</nurc:layers>

</gml:featureMember>

For the curious the current code is here:

https://github.com/aaime/geoserver/tree/catalogstore/src/community/catalog-store/src/main/java/org/geoserver/data

It’s really just a proof of concept, It lacks tests, comments, javadocs, pretty much every possible kind of optimization.

One annoying thing that I’ve noticed playing with it was me trying to do something like “ah, let’s only see the layers in namespace ‘sf’” (by adding it in the path, virtual service) and GeoServer responding me “don’t know what nurc:layers is”. Gah :slight_smile:
(the published catalog is still a layer, so it can only be seen when calling the global endpoint, or its own workspace specific one, but not others).

Anyways… is there interest? Anyone wants to pick it up and turn it into something useful?

Cheers
Andrea

==
GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Fun! Interesting to see with a different catalog.

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

Very cool!

I could see this being very interesting for projects like geonode that are focused on more on the sharing aspect of data from different geoservers.

···

On Sun, May 26, 2013 at 4:54 PM, Phil Scadden <p.scadden@anonymised.com> wrote:

Fun! Interesting to see with a different catalog.

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.


Try New Relic Now & We’ll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Yeah, very cool. And yeah, I hadn’t thought of that, but could be a cool GeoNode feature - be able to see a map of all the holdings on that GeoNode. A visual catalog that can be queried.

Could also be cool to have it on the root geoserver web page as an openlayers map - give people a quick overview of what’s in the geoserver instead of having to query the capabilities document or click on every layer preview.

···

On Sun, May 26, 2013 at 4:54 PM, Phil Scadden p.scadden@anonymised.com wrote:

Fun! Interesting to see with a different catalog.

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.


Try New Relic Now & We’ll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may


Geoserver-devel mailing list
Geoserver-devel@anonymised.comt
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

On Mon, May 27, 2013 at 10:43 PM, Chris Holmes <chomie@anonymised.com> wrote:

Could also be cool to have it on the root geoserver web page as an
openlayers map - give people a quick overview of what's in the geoserver
instead of having to query the capabilities document or click on every
layer preview.

Right, though about it as well... but having some hesitations.
The thing is, that's a store, it's something you're at liberty of
configuring, or not have.

The UI elements in the home page should then follow that, and appear only
when the store is configured.
And I guess it would be cool to have the user click on the map, and have
some sort of "feature info" that also provides
some preview links itself

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------