Conversion method from one spatial reference to another one

4305
6
08-07-2014 07:21 AM
TorbenWiggerich
New Contributor III

Hi all,

currently I'm trying to load a local map. The local map is written with the spatial reference 3857 but I need a spatial reference of 4326.

Are there any methods to get this conversion?

Or do I need a completly new map, with spatial reference 4326? So this would mean, there is no conversion method.

So, at the moment I just found the EsriRuntimeQt::GeometryEngine where I can for example change a point from spatial reference 3857 to 4326. But I can't do this with a whole map...

0 Kudos
6 Replies
EricBader
Occasional Contributor III

The first layer that gets added to the map defines the Spatial Reference. One thing you could do is to add a basemap in 4326, then add your local map layers.

0 Kudos
TorbenWiggerich
New Contributor III

What exactly do you mean with "basemap"?

I don't know how I could make this, because I can't insert the spatial reference? There is no method for it...

I need sth. like the following order: (The first will be shown in front.)

     - Display of some informations like directions...

     - 4326 Display of TiffLayer

          - Tiff 1

          - Tiff 2

          - etcetera

     - 3857 ArcGISLocalTiledLayer / Basemap?

0 Kudos
EricBader
Occasional Contributor III

Sorry, I should have explained better.

So, the first layer you add to your map will be a layer with a spatial reference of what you want, 4326. Correct? This becomes the bottom layer, so to speak. Then, add your tiff layers on top of that.

Did I misunderstand your question? If so, I apologize.

0 Kudos
TorbenWiggerich
New Contributor III

No, that is not so correct, the basemap is in 3857 and this is the one which I need to convert in 4326.

The tiff layer is already in 4326.

So at the moment I set the SpatialReference of the map to be in 4326.

Than I try to add the map, which fails, because the map is in 3857.

Than I load the different tiff - layers. This works fine.

Than I display some other information. This also works.

0 Kudos
TorbenWiggerich
New Contributor III

But as Michael pointed out here: Best practices:Reprojection (changing spatialreference) for layers within Map Control

It doesn't work with tiled layers?

So I have to write (somehow) a dynamic layer for a local map...

But than I don't have a tiled layer...

0 Kudos
ThomasDunn
Occasional Contributor

Torben,

To summarize: The basemap layer is the first one assigned to the map, and underlies all other map layers. The spatial reference of the basemap layer becomes the spatial reference of the map. The basemap layer of your map is coming from a local tiled layer. Tiled layers cannot be reprojected by your application (an noted in Michael's post cited above) so it must start out having the same spatial reference that you want to use in your map.

I hope this clarifies the matter. Please let us know if you have more questions. Thank you.

-- TAD

0 Kudos