Select to view content in your preferred language

Overlay a image onto the map programmatically

721
3
Jump to solution
10-19-2022 02:31 AM
Aeseir
by
Frequent Contributor

I am trying to figure out if it is possible to overlay image onto the map programmatically and am wondering if its even possible with ArcgisJS SDK?

 

The idea is for user to upload and image they have of a map area (either from aerial vehicle or from scanned images such as old maps) and overlay it programmatically

0 Kudos
1 Solution

Accepted Solutions
Sage_Wall
Esri Contributor

Hi @Aeseir ,

We recently added MediaLayer at v4.24, which provides this ability. The ability to use control points to georeference an image is being added in 4.25 and is currently available on the next branch for testing purposes. You can see the release notes about ControlPointGeoreference here: https://github.com/Esri/feedback-js-api-next/blob/main/CHANGELOG.md#layer-updates

View solution in original post

3 Replies
makatogonzo
New Contributor

Use what should be obsolete, World File. 

https://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/world-files-for-raster-datas...
https://webhelp.esri.com/arcims/9.3/General/topics/author_world_files.htm

I'm trying to understand how to calculate each parameter myself. Their skew/rotation documentation and explanation isn't very clear.

I got this part.

A = mx · cos t
B = my · (k · cos t - sin t)
D = mx · sin t
E = -1 · my · (k · sin t + cos t)
C = translation in x direction
F = translation in y direction

I don't understand this part. Please explain:


Each of these coefficients can be defined as

where

mx = change of scale in x direction
my = change of scale in y direction
k = shear factor along the x-axis = tan (skew angle) (the skew angle is measured from the y-axis)
t = rotation angle, measured counter-clockwise from the x-axis

How to calculate mx, my, k, t ??

0 Kudos
Sage_Wall
Esri Contributor

Hi @Aeseir ,

We recently added MediaLayer at v4.24, which provides this ability. The ability to use control points to georeference an image is being added in 4.25 and is currently available on the next branch for testing purposes. You can see the release notes about ControlPointGeoreference here: https://github.com/Esri/feedback-js-api-next/blob/main/CHANGELOG.md#layer-updates

Aeseir
by
Frequent Contributor

That is great news, had a quick look at it and that will do the trick nicely.

0 Kudos