adding a feature type to GeoServer by manually editing the configuration files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

adding a feature type to GeoServer by manually editing the configuration files

Albrecht Weiser-2
Hi community,
although i get the advice from everywhre to use the manager for
configuration, i must add the feature types automitically (i use GeoServer
within a platform, where somebody can upload geodata and store it
automatically in a PostGIS Database- for displaying the data, i must
acquaint the data with GeoServer automatically). So far so good-
i create a feature type after every upload in the data/FeatureTypes -
directory. Here comes the info.xml:

<featureType datastore="localPostgis">
        <name>hochwasser1983</name>
        <SRS>31467</SRS>
        <title>hochwasser1983_type</title>
        <abstract>sorry, no special abstract yet</abstract>
        <numDecimals value="0"/>
        <keywords>localPostgis hochwasser1983</keywords>
        <latLonBoundingBox dynamic="false" miny="49.2706334254266" maxy="49.4056108965219" maxx="8.53300933092924" minx="8.41138253304735"/>
</featureType>

As i can see, there is no mistake in the info.xml. the name of the
feature type is called the same like the name of the table in the
postgis database (hochwasser1983). So GeoServer should find that
feature. But when i make a GetCapabilities, the feature isn't beeing
found by GeoServer.
(I tested the connection to the PostGis database with another feature
i created with the config-manager and it is o.k. - so its not a problem
of the datastore-settings in the capabilities.xml)
Maybe there exists another file, where i have to register the feature
types? Or why can it be, that GeoServer doesn't find it?

Thanks in advance, i wish everybody a happy (and successful) new year
Albrecht




Albrecht Weiser, Dipl.-Ing (FH)

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

Institut für Raumbezogene Informations- und Messtechnik, i3mainz
Fachhochschule Mainz
Holzstraße 36
55116 Mainz

Tel.: 06131/2859-686
Fax:  06131/2859-699
mailto:[hidden email]



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: adding a feature type to GeoServer by manually editing the configuration files

Chris Holmes-2
I believe the main thing your missing is reloading the catalog.  You
need to tell GeoServer to ingest the xml.  There have been thoughts of
an ingestion engine to automatically pick up changes, but they aren't
implemented.  There's a wiki page on how to do this, with examples in
perl and java.  If you're doing another language feel free to throw up
another example.  See:
http://docs.codehaus.org/display/GEOSDOC/Alternative+for+reloading+the+Geoserver+catalog

Also, if you have a spare moment when you get something working with
GeoServer, it'd be great if you could let others know about it, and how
you did it.  This is a great contribution back, since actual on the
ground examples and experiences really help out new users, and we've
just set up areas to make it easy to write things up in any form you
feel comfortable with.  See:
http://docs.codehaus.org/display/GEOSDOC/User+Experiences

best regards,

Chris

Quoting Albrecht Weiser <[hidden email]>:

> Hi community,
> although i get the advice from everywhre to use the manager for
> configuration, i must add the feature types automitically (i use
> GeoServer
> within a platform, where somebody can upload geodata and store it
> automatically in a PostGIS Database- for displaying the data, i must
> acquaint the data with GeoServer automatically). So far so good-
> i create a feature type after every upload in the data/FeatureTypes -
> directory. Here comes the info.xml:
>
> <featureType datastore="localPostgis">
>         <name>hochwasser1983</name>
>         <SRS>31467</SRS>
>         <title>hochwasser1983_type</title>
>         <abstract>sorry, no special abstract yet</abstract>
>         <numDecimals value="0"/>
>         <keywords>localPostgis hochwasser1983</keywords>
>         <latLonBoundingBox dynamic="false" miny="49.2706334254266"
> maxy="49.4056108965219" maxx="8.53300933092924"
> minx="8.41138253304735"/>
> </featureType>
>
> As i can see, there is no mistake in the info.xml. the name of the
> feature type is called the same like the name of the table in the
> postgis database (hochwasser1983). So GeoServer should find that
> feature. But when i make a GetCapabilities, the feature isn't beeing
> found by GeoServer.
> (I tested the connection to the PostGis database with another feature
> i created with the config-manager and it is o.k. - so its not a
> problem
> of the datastore-settings in the capabilities.xml)
> Maybe there exists another file, where i have to register the feature
> types? Or why can it be, that GeoServer doesn't find it?
>
> Thanks in advance, i wish everybody a happy (and successful) new year
> Albrecht
>
>
>
>
> Albrecht Weiser, Dipl.-Ing (FH)
>
> --------------------
>
> Institut für Raumbezogene Informations- und Messtechnik, i3mainz
> Fachhochschule Mainz
> Holzstraße 36
> 55116 Mainz
>
> Tel.: 06131/2859-686
> Fax:  06131/2859-699
> mailto:[hidden email]
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>




----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users