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.

I am very much fine with creating a circle in Geoserver using st_buffer to create a view by providing latitude, longitude and radius values. It creates only a circle but without center. But I want to even see the center of the circle marked. What is to be done for this???

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

If you want to add the center points of your circles, you need to create a new layer in Geoserver that accesses the point information inside the PostGIS database. If you only have latitude and longitude columns there, you have to create a table/view with point geometries. ST_MakePoint() will be helpful.

share|improve this answer
    
But it would be better if both(circle and center point) can appear as in a single layer rather than separate layers. Is there any possibility for this?? –  Vikash Talanki Jun 9 '11 at 15:52
    
You can combine the circle and point layers into a layer group. In OpenLayers, you only need to request the layer group then. –  underdark Jun 9 '11 at 16:09
    
Oh thats a better idea. Will work on that. Thankyou –  Vikash Talanki Jun 9 '11 at 16:33
    
@user1795 : well, you should mark underdark answer as accepted –  simo Jun 10 '11 at 8:02
add comment

Have you considered something like:

SELECT ST_GeomFromText('GEOMETRYCOLLECTION(circularstring_geometry,ST_Centroid(circularstring_geometry))',[SRID]);

where circularstring_geometry represents the geometry value of the circle you already created.

May be off base here -- don't know how (or if) geoserver handles collections.

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.