File size increase when projecting raster

9473
22
Jump to solution
10-06-2015 12:17 PM
forestknutsen1
MVP Regular Contributor

Why when is it that when I project a raster from Alaska state plane zone 4 feet to Web Mercator does the file size increase so dramatically? It starts at ~29MB before it is projected and then increases to ~257MB after projection.

NAD_1983_2011_StatePlane_Alaska_4_FIPS_5004_US_Survey_Ft

WGS_1984_Web_Mercator_Auxiliary_Sphere

The only thing I can think of is that the distortion in web mercator at high latitudes is causing the raster to be "stretched" in some way and then leading to an increase in file size.

Thanks for any input.

22 Replies
CodyBenkelman
Esri Regular Contributor

Forest

I thought I should summarize, although the post by Gabriel Upchurch summarized this pretty well – and your initial assumption [that this is caused by the inherent distortion of Web Mercator at high latitudes] was correct.  I should have realized the details sooner.

In the Web Mercator projection, the scale increases as (1/(cosine of Latitude)) so at 60deg it is 2x larger (2x scale error), and your data is at about 70 degrees latitude, so the scale error is almost exactly a factor of 3.  Cosine(70) = .3420.  That means it is a proper implementation for a Web Mercator projection that a distance of 100 meters will be reported to appear to be 300 meters.  I had not realized this distortion would be embedded into a reprojected file, but it is necessary for compatibility with the coordinate system.  Multiplied in 2 dimensions, this (3x3) distortio is a factor of ~9, so your input file (29 MB) becomes almost 250 MB after reprojection.

This really emphasizes the disadvantage of using a projected coordinate system too far from its origin. If all of your work will be at high latitudes, it would be better to use a local coordinate system, assuming any measurements will be made on the map.   

Note I did some testing, and verified that the ArcGIS Online web map compensates for the distortion, so it provides generally accurate measurements. (Exactly how accurate, I do not know – I would need to ask our experts…)

Also note that ArcGIS Desktop has options for how it reports measurements.  It will default to "PLANAR" measurements when using the measure tool (which does NOT compensate for the scale distortion), but the tool has the option to choose "GEODESIC" which will provide accurate local measurements.

WebMercator-GeodeticMeasurements.png

Options to consider:

  1. The best option is to use the Mosaic Dataset to serve your imagery directly from its original format, and the application that consumes it can request any projection (AK State Plane, Web Mercator, other) and ArcGIS will project on the fly.  For this, you will need our Image Extension, and I’m trying to confirm if your client already has it.  The advantage is you won’t have to duplicate data on disk (either as export to Web Mercator *or* in raster tile cache format).
    1. Sub-option here – you do not need the image extension to serve one single image e.g. an orthomosaic of a single project site – but I’m guessing you have more than one site/one image and you would want to use a Mosaic Dataset & thus the Image Extension…
  2. If the web map needs to support measurements, consider building your web maps/apps in Alaska State Plane or another appropriate coordinate system.  It is not mandatory for web maps/apps to use the Web Mercator projection, but that raises the question of what other data must appear in your maps…
  3. If you want to proceed with services using Web Mercator, I think they can be fine for visualization at Latitude 70 degrees (but at even more extreme latitudes I think the distortion would be unacceptable).  If your users expect to make any measurements, you will need to consider and test the Web Mercator scale issues carefully.
  4. If you do proceed in Web Mercator, I’d suggest you cache directly from the Mosaic Dataset.  The cache may increase in size due to the scaling, but you should use JPG format (assuming your images are continuous imagery or a hillshade of elevation data), and keep the scale changes due to the projection in mind – if you want the visual quality of a level 19 cache, you can actually start at level 18 (1/4 the data volume) and you won’t lose visual quality.  Again, we should test a small area first to be sure!
    1. Note I had forgotten that your data file was 32 bit float.  If this is elevation data, then the raster tile cache format is not usable – it is limited to 8 bits, 3 bands.  We can share elevation data as a compressed 3D surface (different cache format), so if you need to share elevation values, this is a separate discussion.  But note that using a dynamic image service, shared from a Mosaic Dataset, solves this…
LeoLadefian5
Occasional Contributor II

I'm having trouble with publishing directly from mosaic (state plane) using webappbuilder.  I guess webappbuilder doesn't reproject on the fly?

0 Kudos
CodyBenkelman
Esri Regular Contributor

Leo

Web AppBuilder does not publish, so I don't understand what you are trying to do.  and no, it also does not reproject.  However if you have an image service published (through image server) from a mosaic dataset, web appbuilder can request any (known) projection, and the server will reproject on the fly.

Can you start a new thread and explain more completely what you have, and what you're trying to do?  Also let us know what version of ArcGIS Desktop (ArcMap? ArcGIS Pro?) you are using

Cody B

0 Kudos