Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This might be a very basic question as I am new to GeoServer.

What I am trying to do:

  1. I have a MySQL table that stores data attached to a spatial point and have latitude and longitude columns to store the location attribute.
  2. Use GeoServer to display these data points as layer.

What has been done:

  1. Create a new table which is duplicate of the original table but also have POINT field which is generated using POINT(orig_lat, orig_lon).
  2. Use the MySQL extension to create a new data store linked with this spatial_table.
  3. Create a new layer here we need two fields called as native and declared SRS, in the demo I had seen EPSG:4326 as the declared SRS and hence I have added that SRS.

Problem:

  1. When I view the layer preview in openlayer I do not see any map? Not sure if this is because of SRS or do I need to specify a map layer.
  2. Most of the points seem like they are overlayed on top of each other and zoomin and panning does not make much difference. This seems like SRS issue.
  3. Is it possible to overlay the points on top of google maps using geoserver?
share|improve this question
add comment

2 Answers 2

For 1 and 2 : try to set "force declared" in SRS Handling combobox. By the way did you define srs for your dataset in MySQL ?

For 3 : No it is not possible if you mean using baselayer in layer preview but if you use openlayers you can overlay your layer that is served by Geoserver on top of google maps or open street maps.

share|improve this answer
    
Thank you for the response. No I did not define SRS for my dataset in MySQL, can you point to me how to do that and what SRS to be used? –  PravinCG Sep 4 '12 at 18:49
    
Sorry I overlooked at that you are using Mysql extension. Did you check this : geo.ifip.tuwien.ac.at/imak/2009/stack_workshop/doc/mysql/… It says "MySQL does not know about spatial reference systems (SRS). It is up to you to provide the correct EPSG code for the stored coordinates." Therefore Goeserver settings should be sufficient. –  oalan Sep 4 '12 at 19:24
    
That is my original question. How to figure out what is the correct SRS code. –  PravinCG Sep 5 '12 at 4:31
    
Then I should ask do you arbitrarily creating those points or are they coming from a dataset with a certain SRS ? If it is arbitrary then go with ESPG:4326 otherwise set native SRS to the one that the dataset has. However I guess you don't have it right ? –  oalan Sep 5 '12 at 8:02
    
These are data logged for a specific points using GPS receiver. I am not aware if they are related to a certain dataset. –  PravinCG Sep 5 '12 at 8:36
add comment

As oalan said, you need to find the srs of your spatial informaiton (but you can actually overlay your data in the geoserver test page). If the points comes from a GPS, it could (reasonably) be EGS84 (EPSG:4326). What you can try is to overlay your data to a WMS map server. In your geoserver, add a new datasource of type WMS, using a publi free WMS service like this.

Then, in the "layer preview" open the OpenLayers test page with your data, and add the new wms layer at the url of the page

Example

http://151.100.152.211:8080/geoserver/optima_piemonte/wms?service=WMS&version=1.1.0&request=GetMap&layers=optima_piemonte:OSM_Basic,optima_piemonte:link&styles=&bbox=6.3524498779,44.0513994159,9.4117305287,46.4209065153&width=512&height=396&srs=EPSG:4326&format=application/openlayers

In my case, optima_piemonte:link is my layer, and optima_piemonte:OSM_Basic is a layer produced by the service above linked

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.