Upload GeoTiff

734
5
Jump to solution
12-05-2018 09:27 AM
RobertKirkwood
Occasional Contributor III

Is there any way to upload a GeoTiff using the ArcGIS Portal API like this example for shapefiles?

ArcGIS API for JavaScript Sandbox 

The client wants to be able to upload the GeoTiff and see it in the webmap. 

ArcGIS API for JavaScript

ArcGIS API for JavaScript

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Robert,

  It would be possible using the MapIamgeLayer and MapImage classes but you would have to use a third party library like geotiff.js to read the GeoTiff header to get the GeoTiff extent.

Here is a snippet on how to use those classes:

        var layer = new MapImageLayer({
          'id': 'radar',
          'opacity': 0.5
        });

        var mi = new MapImage({
          'href': 'http://radar.weather.gov/ridge/Conus/RadarImg/latest.gif',
          'extent': {
            'xmin': -127.629361176,
            'ymin': 21.6615237154,
            'xmax': -66.5269235294,
            'ymax': 50.4156120199,
            'spatialReference': {
              'wkid': 4326
            }
          }
        });

        layer.addImage(mi);

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Robert,

  It would be possible using the MapIamgeLayer and MapImage classes but you would have to use a third party library like geotiff.js to read the GeoTiff header to get the GeoTiff extent.

Here is a snippet on how to use those classes:

        var layer = new MapImageLayer({
          'id': 'radar',
          'opacity': 0.5
        });

        var mi = new MapImage({
          'href': 'http://radar.weather.gov/ridge/Conus/RadarImg/latest.gif',
          'extent': {
            'xmin': -127.629361176,
            'ymin': 21.6615237154,
            'xmax': -66.5269235294,
            'ymax': 50.4156120199,
            'spatialReference': {
              'wkid': 4326
            }
          }
        });

        layer.addImage(mi);
RobertKirkwood
Occasional Contributor III

Would this be used like the upload shapefile, where it could upload the GeoTiff on the fly? For example, a person wants to upload the GeoTiff to see where their work area is, upload the GeoTiff, and zoom to it. Then they may want to upload a different one, one and on, etc. 

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

That's possible for a developer.

RobertKirkwood
Occasional Contributor III

Thanks for the link. I see some applications there that are doing what i need to do as well. Thanks!

0 Kudos
RobertKirkwood
Occasional Contributor III

Is ESRI thinking about making this a feature for the future? We have had a lot of clients request this. I looked into the links you sent and they work (barely) with very small images.