I am afraid uDig may be tricking you - it is willing to pick up the ".prj" file of your shapefile and reproject it match your map (which may very well be in lat/lon). Can you check if your shapefile has a ".prj" file?
Jody On 19/08/2009, at 8:42 PM, iceDice wrote: > > Hello, > > I am getting strange results for feature coordinates when i use: > geom = (Geometry)feature.getDefaultGeometryProperty().getValue(); > Coordinate[] coords = geom.getCoordinates(); > I display shapefile with uDig and saw that all features have > coordinates > around > (lon,lat)=(-122,48). > However when i try to display coords values i get something like: > c.x = 1561362.83792108, c.y = 710769.236710566. > > I create graph from those features and set source and destination > point to > find the best path between them in coordinates like those i got with > geom = (Geometry)feature.getDefaultGeometryProperty().getValue(); > (c.x = 1561362.83792108, c.y = 710769.236710566) > However as result i get path which is not in same range as original > shape > file. > Those two files (original shapefile and shapefile which represents > best > path) are > appearing on map at very different scales which is very strange to me. > > I manage to get proper results using other shapefiles with same > procedure, > but i have problem with this specific shapefile. > > I hope so someone can help me. > > Best regards. > > -- > View this message in context: > http://n2.nabble.com/SimpleFeature.getDefaultGeometry%28%29-tp3471524p3471524.html > Sent from the geotools-gt2-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
