I have Rastr Image(GeoTif) in metters format and other layer in Degrees.
How can I display both layers?
Becouse if add thouse two layers wone at position (35;49) other at (2342344;3242344 or something like thet)
I have Rastr Image(GeoTif) in metters format and other layer in Degrees.
How can I display both layers?
Becouse if add thouse two layers wone at position (35;49) other at (2342344;3242344 or something like thet)
Art,
Welcome to the community, hope you enjoy the learning and sharing here!
You need to do the projection transformation from one layer to another. I guess your other layer is a vector layer right? If yes, you need to find out what the projections of the 2 layers are and then do the transformation. Please have a look at the sample Markers->AddProjectedMarkers which shows how to add Points in DecimalDegree on GoogleMap which is in another projection.
Let me know if you have any issues.
Thanks,
Ben
Thet is my geotiff.
It's Projection Name = World_Mercator!!!
Driver: GTiff/GeoTIFF
Files: C:\Program Files\ThinkGeo\Map Suite Web Evaluation Edition 3.0\Samples\CSharp Samples\SampleData\World\1\Project_M36-1.tif
C:\Program Files\ThinkGeo\Map Suite Web Evaluation Edition 3.0\Samples\CSharp Samples\SampleData\World\1\Project_M36-1.aux
Size is 2116, 2194
Coordinate System is:
PROJCS[" Projection Name = World_Mercator Units = meters GeoTIFF Units = meters",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]],
I need use Proj4Projection.GetWorldParametersString()
with what parameter string?
And! GeoTiffRasterLayer does not have the property as .FeatureSource.Projection!!!!
What a property used for projection of rastr images???
Because I have(need to use) more then 1000 of vector layers...
and if
Map1.MapUnit = GeographyUnit.DecimalDegree;// then all good with vector
if
Map1.MapUnit = GeographyUnit.Meter; //then all good with rastr.
Thenck you wery much for your help
and sorry for my englesh)
And
GeoTiffRasterLayer Tiff = new GeoTiffRasterLayer(MapPath("~/SampleData/world/1/Project_M36-1.tif"));
Tiff.Open();
and
Tiff.HasProjectionText == false!!!
What can it be?
proj4Projection.InternalProjectionParametersString = "+proj=longlat+ellps=WGS84+datum=WGS84+no_defs+units=m"
Is working !
but
proj4Projection.InternalProjectionParametersString = "+proj=longlat+ellps=WGS84+datum=WGS84+no_defs+units=d"
NO!!!
units = what???
how yoy named degrees?
Artem,
We can only do the projection transformation for a vector layer. That means you cannot convert your GeoTiff’s projection to the Vector Layer’s projection, but can only do the other way. That’s why there is no “ImageSource.Projection” property in GeoTiffRasterLayer.
In some GeoTifff, projection information is embedded in the file itself, that’s why we have the GeoTillRasterLayer.HasProjectionText property. You can see it just shows whether the projection info is involved, it has no relationship with the projection transformation.
As WGS84 has the EPSG number of 4326, you can set it like this.
proj4.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);
You can also find the corresponding string in the “…\ThinkGeo\Map Suite Web Evaluation Edition 3.0\Documentation\Projections\EPSG.rtf”. In fact it’s “+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs”
Thanks,
Ben
)
I understood!
My externalProjection is World Mercator)
But it is stuped:
If i need to show two images with different projections i need to convert them before, becouse conversion of rastr layers is impossible in you api, Am I right?
And converting of vector layers is make map MORE slover…
Thenks for help)
Artem,
Yes, if 2 raster images are under different projections, they cannot be showed on Map unless one is converted to another. Like what you said, the projection conversion does slow the vector layer, if the app is performance sensitive, you can convert the vector layer to another projection and save it to disk first, and just load it without and transformation in you app.
Thanks,
Ben