Looking at the data - can I from the data in the database maximize the amount of transformations I can do? As said I am only interested in to/form WGS84, perhaps there is data hidden in that database that can help gdal, help me set up gdal, to do the transformation required. The data I have now often lacks the toWGS84 components...

Yours
Tomas



Francis Markham skrev 2010-07-08 10:25:
Yeah, I mean the "area of use" as EPSG call it.  You can download the
EPSG database which contains a table with areas of use from
http://www.epsg.org/Geodetic.html and extract that for use in your
application if that is going to be helpful for you.

-F

On 8 July 2010 16:53, Tomas R<[email protected]>  wrote:
  You mean
  area_of_use_code="2847"
which gives
<Area area_code="2847" area_name="Sweden - 2.5 gon W" area_of_use="Sweden.
For medium and small scale applications:- all country. For large scale
applications:- communes between approximately 14 deg 40 min and 16 deg 55
min East. See information source for map."
information_source="Lantmateriverket (National Land Survey of Sweden).
http://www.lm.se/geodesi/refsys/rt/rt_projections.html"; data_source="EPSG"
revision_date="2003-06-27" deprecated="0"/>


Or is it from this line
<3021>  +proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1.000000
+x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs<>

or from the WKT
PROJCS["RT90 2.5 gon
V",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel
1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1055246174,41.3265500042,603.0582474221,-0.8551163377,2.1413174055,-7.0227298286,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3021"]]

or some other file/source?
All data regarding the Swedish RT90 2.5 V  where only the WKT is complete
with toWGS84 parameters.
A not so easy task, and not reliable, to retrieve the info from there I
would guess.

My goal is not to be 100% accurate at all points in the world, my goal is to
be consistent in the answers to the calls I get. That is the functions
PixelToGPS and GPSToPixel should return "compatible" results at all parts in
the world so that the main application won't have any risk of getting
confused and run into infinite loops or alike.
not to hard to step from (in WGS84) 180 to -180 and +85 to -85 and check for
every  fifth degree, or so, if the transformation is valid.  When
transformation not valid the plan is to switch to WGS84 which seems to work
even though results can be interesting in the boundary between the
coordinate systems.

But still, if the info already exists somewhere why not use it but I do not
know if that info exist in the data I have available.

Thanks anyway
Tomas

Francis Markham skrev 2010-07-08 08:14:
I think the EPSG dictionary defines areas of validity for the defined
coordinate systems.  That could be a starting point, although there
may be a better solution

-Francis

On 8 July 2010 16:01, Tomas R<[email protected]>    wrote:
  No one?

Ok, I guess then that there are no common function/method of doing this.
My
approach will the be trial and error. From WGS 84 transform to the local
coordinate system and back again to WGS84 and check if the result seems
valid.

Should work or any expert here have another solution?

Yours
Tomas

Tomas R skrev 2010-07-05 09:05:
  Attacking GDAL via the C# interface and I have a question

Have set up two (Osr) SpatialReferences  and transformations to and form
both. One system is WGS84 and the other is unknown.

To get a consistent behaviour I need to retrieve the boundary, in WGS84
coordinates, of the unknown system. If known I can fallback on WGS84
when
calls outside the scope of the coordinates system are made.
  Should be easy to read of some attribute of the SpatialReference or
alike. But which/how?

Any suggestions?

Or how should I solve it - in general words:
My application maps coordinates from and to WGS84 and serves them to
another via calls like PixelToGPS and GPSToPixel. The originating
coordinate
system is always WGS84. Need to handle calls made outside the scope of
the
coordinate system and my approach, to get a consisting behaviour of the
two
functions, is to revert to WGS84 which is defined at all possible
points.


Yours
Tomas
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to