Hi again;
> Can you give an example of what you mean by above? What is an example 
> of a data format and how does a data format specify its CRS.
Sure - a shapefile is a common data format that is made up of the 
following files:
- file.shp - holds the geometry (we parse these into a JTS Geometry and 
you can get it out as the "default" geometry)
- file.shpx - some kind of index
- file.dbf - the attributes stored as a dbase3 dbf file
- file.prj - a little text file with the projection information stored 
in WKT; this is turned into a CRS

For PostGIS the information comes from:
- any old table - holds the attributes; including geometry attributes
- geometry_columns table - holds a list of all the geometry columns 
used; and records the SRID
- spatial_ref_sys table - holds a table of SRID numbers and the WKT 
definitions of the CoordinateReferneceSystem for each SRID

Does that help? Each spatial data format has a different way of holding 
this kind of information.
> This (udig) was a great visual example to make your point that 
> features from different sources using different CRS can all be used in 
> the same map. How does udig determine what CRS to use for each feature 
> set loaded from a shape file? Where in the code is that determination 
> done?
uDig does not really know what kind of data it is working with; it 
trusts the 
FeatureType.getDefaultGeometry().getCoordinateReferenceSystem(). Behind 
the scenes shapefile and postgis handle things differently.

All the best,
Jody

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to