<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Image to Real World Size CALCULATION in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375371#M83482</link>
    <description>&lt;P&gt;When using a simple marker instead of CIM with a base64 image. It's working with some distortion due to map projection I guess&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Using simple marker:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;A href="https://codepen.io/michaelk95/pen/rNRpvLG" target="_blank" rel="noopener"&gt;https://codepen.io/michaelk95/pen/rNRpvLG&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_0-1706535650180.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93024i10101D186CD6FA7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_0-1706535650180.png" alt="michaelkdev_0-1706535650180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Using CIM marker:&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_1-1706535721761.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93025i51CC4627DBCE4403/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_1-1706535721761.png" alt="michaelkdev_1-1706535721761.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;The base64 Image:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_2-1706535769760.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93026i88754ADBD76103F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_2-1706535769760.png" alt="michaelkdev_2-1706535769760.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;All images are&lt;STRONG&gt; 3/4 of the original size?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jan 2024 13:43:40 GMT</pubDate>
    <dc:creator>michaelpoa</dc:creator>
    <dc:date>2024-01-29T13:43:40Z</dc:date>
    <item>
      <title>Image to Real World Size CALCULATION</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1374777#M83466</link>
      <description>&lt;P&gt;Hi. I'm trying to figure out how to scale an image to the real world using visualVariables.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;U&gt;VisualVariables:&lt;/U&gt;&lt;/STRONG&gt;&lt;BR /&gt;{&lt;BR /&gt;type: "size",&lt;BR /&gt;field: "WIDTH",&lt;BR /&gt;valueUnit: "meters"&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Graphic A:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;latitude: &lt;STRONG&gt;51.27498953565823&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;longitude:&lt;STRONG&gt; 4.334665991886453&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;width: &lt;STRONG&gt;100&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_0-1706259986983.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92910i040065C93870F673/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_0-1706259986983.png" alt="michaelkdev_0-1706259986983.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;U&gt;Graphic B:&lt;BR /&gt;&lt;BR /&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;latitude: 70.4059597&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;longitude: -22.488634&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;width: &lt;STRONG&gt;100&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_1-1706260287172.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92911i51CC84C15BFAF423/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_1-1706260287172.png" alt="michaelkdev_1-1706260287172.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Both images have a&lt;STRONG&gt; width of 100 (in meters)&lt;/STRONG&gt;. The &lt;STRONG&gt;image is a base64 string with ratio 1x1 (1px).&lt;/STRONG&gt;&amp;nbsp; And using visualVariables I would think these 2 images would have the same width/distance being 100 in meters or a scale taking the image ratio of 1x1 into account.&lt;/P&gt;&lt;P&gt;Can someone help me to calculate the correct scaled width based on geodesic and planar formulas?&lt;/P&gt;&lt;P&gt;Take 1. The width of graphicA would be something like 200 to get 100m and graphicB would have a width close to 400 to have a real width in meters of 100.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Gr&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&amp;nbsp;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 09:19:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1374777#M83466</guid>
      <dc:creator>michaelpoa</dc:creator>
      <dc:date>2024-01-26T09:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Image to Real World Size CALCULATION</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375016#M83472</link>
      <description>&lt;P&gt;Are you doing this in a web map with a web mercator basemap?&amp;nbsp; I think if I understand the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#RealWorldSize" target="_self"&gt;docs correctly&lt;/A&gt;, the size specified in the visual variable will be relative to the planar coordinates of the map the map view's spatial reference.&amp;nbsp; Web mercator, which nominally uses metres, will have a scale factor that gets increasingly exaggerated as you move towards the poles.&lt;/P&gt;&lt;P&gt;The measurement tool I believe is giving you geodesic measurements (i.e., the actual real-world ground distance, not measured in planar coordinates).&lt;/P&gt;&lt;P&gt;If you put your two graphics at the same latitude, they should have the same size.&amp;nbsp; If you position them somewhere along the equator, I think they will appear to be same width you specify in the visual variables.&lt;/P&gt;&lt;P&gt;If that proves to be the case, then I think specifying the symbol size this way will only work if you either use a local projected coordinate system for the map view, or perhaps there is a convenient way in arcade to convert the desired size to planar coordinate size (worst case, maybe &lt;A href="https://gis.stackexchange.com/questions/93332/calculating-distance-scale-factor-by-latitude-for-mercator" target="_self"&gt;use an equation&lt;/A&gt; that takes latitude into account to adjust the size value by scale factor).&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 19:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375016#M83472</guid>
      <dc:creator>mleahy_cl</dc:creator>
      <dc:date>2024-01-26T19:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Image to Real World Size CALCULATION</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375320#M83479</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Considering this image. This could be the correct way of thinking&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_0-1706524893367.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93017i63B86C8610E30955/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_0-1706524893367.png" alt="michaelkdev_0-1706524893367.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So Lets break this down&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;latitude:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;51.27498953565823&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;width of the symbol:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;1 (in meters) &lt;/STRONG&gt;- using visualVariables&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;image ratio width 1px&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;U&gt;&lt;FONT size="5"&gt;&lt;FONT size="4"&gt;Step 1&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;Calculate the&lt;/SPAN&gt; Scale Factor:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SF = 1 / cos(radians(&lt;STRONG&gt;51.27498953565823)) =&amp;nbsp;&lt;FONT color="#339966"&gt;0.6255832662967687&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Step 2 Calculate the Actual True Width:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;ATW = Desired True Width / SF = 1 / 0.625583&amp;nbsp; = &lt;FONT color="#339966"&gt;1.5985&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using 1.59 as new scaled width. The actual width on my codepen measure tool is 0.75 meters.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="75.png" style="width: 148px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93016i875925CE3B9BCBDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="75.png" alt="75.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 11:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375320#M83479</guid>
      <dc:creator>michaelpoa</dc:creator>
      <dc:date>2024-01-29T11:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Image to Real World Size CALCULATION</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375325#M83480</link>
      <description>&lt;P&gt;Using a different latitude:&amp;nbsp;&lt;STRONG&gt;70.4059597&lt;/STRONG&gt; and calculating the ATW. I get &lt;STRONG&gt;2.98 Real Width&lt;/STRONG&gt;. Using this width instead of 1. The size I get with the measuring tool is also&lt;STRONG&gt; 0.75m&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_1-1706525084840.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93018iDD1DAA0AFC24ACD7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_1-1706525084840.png" alt="michaelkdev_1-1706525084840.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is Arcgis doing something special with the visualVariables here?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 10:45:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375325#M83480</guid>
      <dc:creator>michaelpoa</dc:creator>
      <dc:date>2024-01-29T10:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Image to Real World Size CALCULATION</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375336#M83481</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115266"&gt;@AnneFitz&lt;/a&gt;&amp;nbsp;do you have an idea why 1px is translated to 0.75 meters keeping the calculations above in mind.&lt;/P&gt;&lt;P&gt;I'm using CIM symbol with visualVariable size WIDTH and scaleX 1&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 11:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375336#M83481</guid>
      <dc:creator>michaelpoa</dc:creator>
      <dc:date>2024-01-29T11:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Image to Real World Size CALCULATION</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375371#M83482</link>
      <description>&lt;P&gt;When using a simple marker instead of CIM with a base64 image. It's working with some distortion due to map projection I guess&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Using simple marker:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;A href="https://codepen.io/michaelk95/pen/rNRpvLG" target="_blank" rel="noopener"&gt;https://codepen.io/michaelk95/pen/rNRpvLG&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_0-1706535650180.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93024i10101D186CD6FA7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_0-1706535650180.png" alt="michaelkdev_0-1706535650180.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Using CIM marker:&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_1-1706535721761.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93025i51CC4627DBCE4403/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_1-1706535721761.png" alt="michaelkdev_1-1706535721761.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;The base64 Image:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_2-1706535769760.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93026i88754ADBD76103F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_2-1706535769760.png" alt="michaelkdev_2-1706535769760.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;All images are&lt;STRONG&gt; 3/4 of the original size?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 13:43:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375371#M83482</guid>
      <dc:creator>michaelpoa</dc:creator>
      <dc:date>2024-01-29T13:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Image to Real World Size CALCULATION</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375385#M83483</link>
      <description>&lt;P&gt;The problem is the &lt;STRONG&gt;SIZE property&lt;/STRONG&gt; of the CIM symbol. Now it's correct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelkdev_3-1706537193024.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93030iDE91B53CE263EB5B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelkdev_3-1706537193024.png" alt="michaelkdev_3-1706537193024.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the &lt;STRONG&gt;CIM&lt;/STRONG&gt; renderer&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
        type: "simple",
        symbol: {
          type: "cim",
          data: {
            type: "CIMSymbolReference",
            primitiveOverrides: [{
              type: "CIMPrimitiveOverride",
              primitiveName: "symbol-layer-1",
              propertyName: "ScaleX",
              valueExpressionInfo: {
                type: "CIMExpressionInfo",
                title: "Size override",
                expression: "1",
                returnType: "Numeric"
              }
            }],
            symbol: {
              "type": "CIMPointSymbol",
              "symbolLayers": [{
                "type": "CIMPictureMarker",
                primitiveName: "symbol-layer-1",
                "enable": true,
                "anchorPoint": {
                  "x": 0,
                  "y": 0
                },
                "anchorPointUnits": "Relative",
                "dominantSizeAxis3D": "Y",
                "billboardMode3D": "FaceNearPlane",
                "invertBackfaceTexture": true,
                size: 1,
                scaleX: 1,
                "textureFilter": "Picture",
                "tintColor": [
                  255,
                  255,
                  255,
                  255
                ],
                "url": "data&amp;amp;colon;image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+L+U4T8ABu8CpCYJ1DQAAAAASUVORK5CYII="
              }]
            }
          },
        },
        label: "ships",
        visualVariables: [{
            type: "rotation",
            field: "ROTATION",
            rotationType: "geographic"
          },
          {
            type: "size",
            field: "WIDTH",
            valueUnit: "meters"
          },
        ]
      };&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;You should think the size property would override the size property of the CIM symbol? But It's not, when removing the size property of the CIM symbol It works. Can you explain this? Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 14:09:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1375385#M83483</guid>
      <dc:creator>michaelpoa</dc:creator>
      <dc:date>2024-01-29T14:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Image to Real World Size CALCULATION</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1376485#M83503</link>
      <description>&lt;P&gt;Do you have a codepen of the working sample?&amp;nbsp; I'd be interested to have a look.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 15:45:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/image-to-real-world-size-calculation/m-p/1376485#M83503</guid>
      <dc:creator>mleahy_cl</dc:creator>
      <dc:date>2024-01-31T15:45:19Z</dc:date>
    </item>
  </channel>
</rss>

