[Geoserver-users] Datastore SRS parameter.

Dear all,

I’ve got an SRS-related question: how can a GeoServer datastore automatically obtain the SRS of a data set when creating a new Feature Type? From my point of view, the two possibilities are:
1.) I read the SRS directly from the data structure (the SRS is contained in the XML-based data structure).
2.) I hardcode the SRS somewhere in the datastore source (not my preference)

In other words, my question is: how can GeoServer automatically populate the “SRS” field in the “FeatureType Editor” dialog; i.e. which variable/parameter in the code does it read to do this?

Thanks for your advices already in advance,
Bernd.

Hey Bernd

I believe it uses the geotools DataStore to query the database schema
directly to obtain the SRS. So basically the SRS that shows up on the new
FeatureType screen is the SRS in which data in ur database is stored

Regards

Ajay

Bernd Resch wrote:

Dear all,

I've got an SRS-related question: how can a GeoServer datastore
automatically obtain the SRS of a data set when creating a new Feature
Type? From my point of view, the two possibilities are:
1.) I read the SRS directly from the data structure (the SRS is contained
in the XML-based data structure).
2.) I hardcode the SRS somewhere in the datastore source (not my
preference)

In other words, my question is: how can GeoServer automatically populate
the "SRS" field in the "FeatureType Editor" dialog; i.e. which
variable/parameter in the code does it read to do this?

Thanks for your advices already in advance,
Bernd.

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge
conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference:
$250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Datastore-SRS-parameter.-tp24150017p24150627.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Yes, it is dependent on the datastore being used and if the dataset in question properly declares its SRS information. If GeoServer can figure it out it will populate the SRS field, so if it is not it means it is having a problem finding the SRS of your dataset.

What is the backend datasource you are using? If it is a Shapefile does your shapefile have a .prj with it. And that does that .prj properly declare the EPSG code? Many do not.

For postgis, does your table have a geometry columns entry?

Let us know what backend you are using and we can probably better help.

-Justin

ajayr wrote:

Hey Bernd

I believe it uses the geotools DataStore to query the database schema
directly to obtain the SRS. So basically the SRS that shows up on the new
FeatureType screen is the SRS in which data in ur database is stored

Regards

Ajay

Bernd Resch wrote:

Dear all,

I've got an SRS-related question: how can a GeoServer datastore
automatically obtain the SRS of a data set when creating a new Feature
Type? From my point of view, the two possibilities are:
1.) I read the SRS directly from the data structure (the SRS is contained
in the XML-based data structure).
2.) I hardcode the SRS somewhere in the datastore source (not my
preference)

In other words, my question is: how can GeoServer automatically populate
the "SRS" field in the "FeatureType Editor" dialog; i.e. which
variable/parameter in the code does it read to do this?

Thanks for your advices already in advance,
Bernd.

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge
conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference:
$250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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