Hello,
We have a special scenario for a GIS enabled Webapplication.
What we want to do is:
1. A User log into our webapplication
2. The user configures some filters on a web form
2. We create a new view in a Database which limits the result to this
filters and also contains a geometra column with the polygon
---- Until here everything works fine. now....
3. We want to connect to the geoserver and create a new FeatureType which
use this new created view (The DataStore allready exists) and a newly
created style
4. We show the result of this new Layer together with some other layers
My Problem is that i dont know how to access the GeoServer via Java API so
that i can modify his repository.
Abstract like that:
GeoServer geos=new GeoServer("192.168.199.1:8080")
geos.login("geoserver","admin");
FeatureData fd=new FatureData(Datasource1["newview"]);
fd.setBounds(1,10,50,60);
...
Is something like that possible ?
Or is Geoserver sspecialized on answering WMS, WFS, W... requests.
Even if i would create a new Service via Spring injection. Would this be
the right way? Somthing like serviceCreateFeature???
Hope someone can help me a little bit with this request..
Thank you much
Greetings Alex
--
View this message in context: http://www.nabble.com/GeoServer-API---Modyfy-Catalog-by-API-tp17252373p17252373.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Alexander Bruch ha scritto:
Hello,
We have a special scenario for a GIS enabled Webapplication.
What we want to do is:
1. A User log into our webapplication
2. The user configures some filters on a web form
2. We create a new view in a Database which limits the result to this
filters and also contains a geometra column with the polygon
---- Until here everything works fine. now....
3. We want to connect to the geoserver and create a new FeatureType which
use this new created view (The DataStore allready exists) and a newly
created style
4. We show the result of this new Layer together with some other layers
First of all, I'm wondering why you need to create a view at all.
We have extended the WMS protocol to support filtering, you can
append &cql_filter=myAttribute>10 for example, and only the
features respecting the filter will be drawn.
See here:
http://geoserver.org/display/GEOSDOC/WMS+vendor+parameters
My Problem is that i dont know how to access the GeoServer via Java API so
that i can modify his repository.
Abstract like that:
GeoServer geos=new GeoServer("192.168.199.1:8080")
geos.login("geoserver","admin");
FeatureData fd=new FatureData(Datasource1["newview"]);
fd.setBounds(1,10,50,60);
...
Is something like that possible ?
Or is Geoserver sspecialized on answering WMS, WFS, W... requests.
Even if i would create a new Service via Spring injection. Would this be
the right way? Somthing like serviceCreateFeature???
Yes, it's possible, but not in the official geoserver. In the
1.6.x branch we have a RESTConfig module that does more or less
what you're ask by exposing some REST calls. Have a look and see
if that suits your needs, but beware, it's just a prototype,
it may change in any moment and it's not really supported.
Cheers
Andrea
Hello Andrea,
I was actually about to ask a question very similar to Alex's. I am
planning to do an application wherein a user picks a point from a
list, then the application does a radius query on a land usage layer
based on the chosen point, and finally does thematics on the
selection.
This is not very difficult to do with MapServer + Mapscript wherein
there are published APIs that can be used, i.e.
Layer layer = map.getLayer(0);
Selection sel = layer.searchRadius(5); // or something similar to this
etc.
and I have been really wondering if this is also possible with
Geoserver. Will the REST Services be able to handle this?
Thank you very much.
Mario.
On Thu, May 15, 2008 at 10:50 PM, Andrea Aime <aaime@anonymised.com> wrote:
Alexander Bruch ha scritto:
Hello,
We have a special scenario for a GIS enabled Webapplication.
What we want to do is:
1. A User log into our webapplication
2. The user configures some filters on a web form
2. We create a new view in a Database which limits the result to this
filters and also contains a geometra column with the polygon
---- Until here everything works fine. now....
3. We want to connect to the geoserver and create a new FeatureType which
use this new created view (The DataStore allready exists) and a newly
created style
4. We show the result of this new Layer together with some other layers
First of all, I'm wondering why you need to create a view at all.
We have extended the WMS protocol to support filtering, you can
append &cql_filter=myAttribute>10 for example, and only the
features respecting the filter will be drawn.
See here:
http://geoserver.org/display/GEOSDOC/WMS+vendor+parameters
My Problem is that i dont know how to access the GeoServer via Java API so
that i can modify his repository.
Abstract like that:
GeoServer geos=new GeoServer("192.168.199.1:8080")
geos.login("geoserver","admin");
FeatureData fd=new FatureData(Datasource1["newview"]);
fd.setBounds(1,10,50,60);
...
Is something like that possible ?
Or is Geoserver sspecialized on answering WMS, WFS, W... requests.
Even if i would create a new Service via Spring injection. Would this be
the right way? Somthing like serviceCreateFeature???
Yes, it's possible, but not in the official geoserver. In the
1.6.x branch we have a RESTConfig module that does more or less
what you're ask by exposing some REST calls. Have a look and see
if that suits your needs, but beware, it's just a prototype,
it may change in any moment and it's not really supported.
Cheers
Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Mario Basa ha scritto:
Hello Andrea,
I was actually about to ask a question very similar to Alex's. I am
planning to do an application wherein a user picks a point from a
list, then the application does a radius query on a land usage layer
based on the chosen point, and finally does thematics on the
selection.
This is not very difficult to do with MapServer + Mapscript wherein
there are published APIs that can be used, i.e.
Layer layer = map.getLayer(0);
Selection sel = layer.searchRadius(5); // or something similar to this
etc.
and I have been really wondering if this is also possible with
Geoserver. Will the REST Services be able to handle this?
I'm not sure it will, there are no plans in that direction at the
moment. To do something like mapscript we'd have to allow scripting
inside GeoServer as well (think jython scripts or something similar)
... it would be nice, but no one has expressed an intention to implement that so far.
Anyways, for your specific use case, I believe you don't need to
create a view, you can use directly the filtering abilities of
GeoServer WMS:
1) create a normal style and a selection style for your layer
2) have the user draw his selection
3) create a wms request where you ask for your layer twice,
once with the standard style, and again with the selection
style, and add two filter, an empty one for the base layer,
and one using dwithin filter to get out only the features
to be selected
Cheers
Andrea