|
From: Jody G. <jga...@re...> - 2005-09-22 23:25:56
|
Sami Dalouche wrote: >Hi, > >I tried the MemoryDataStore approach, but don't really understand the String I'm >supposed to pass to getFeatureSource..Javadoc doesn't help me either... > >So, I tried the approach explained on : >http://www.geotools.org/The+Map > >it does display points, but does not seem to display them where I expect them >to. >With the coordinates that appear here : >Point point2 = geomFac.createPoint(new Coordinate(10.0, 10.0)); >are these coordinates supposed to be latitude / longitude ? If not, what is the >way to specify latitudes / longitudes ? > > When you construct your FeaureType (of the feature you are about to add to the MemoryDataStore) be sure to include a valid CoordinateReferenceSystem object representing lat long - EPSG:4326 tends to work fine. I think there is even a java constant somewhere around with this common value. CoordainteReferenceSystem crs = CRS.decode("EPSG:4326); You will need to assoicate this with your GeometryAttribute as the "metadata" paraemter provided to the FeatureTypeFactory. Cheers, Jody |