Select to view content in your preferred language

“Shift” tool has performance issue,

4770
27
Jump to solution
07-20-2019 12:37 AM
JamalNUMAN
Legendary Contributor

“Shift” tool has performance issue,

 

I observed that the “Shift” tool has performance issue. Is it normal that a raster of 113 MB takes around 4 minutes in order to be shifted (-50000, -500000)? My machine is with 4 Cores X 64GB RAM

 

Is there any recommendation to increase the performance of this tool?

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
27 Replies
JamalNUMAN
Legendary Contributor

Precisely Dan.

 

The issue here is to convert from “Israel_TM_Grid” to “Palestine_1923_Palestine_Grid”.

 

Unfortunately, none of the built-in algorithms available in ArcGIS can perform the job properly. We found out that the best way to do it is to move the rasters with -50000 in X and -500000 in Y. This way, the “Israel_TM_Grid” is converted precisely to “Palestine_1923_Palestine_Grid”.

 

Correct. Each raster has its aux:

<PAMDataset>

  <SRS>PROJCS[&quot;Israel_TM_Grid&quot;,GEOGCS[&quot;GCS_Israel&quot;,DATUM[&quot;Israel&quot;,SPHEROID[&quot;GRS_1980&quot;,6378137.0,298.257222101]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;False_Easting&quot;,219529.584],PARAMETER[&quot;False_Northing&quot;,626907.39],PARAMETER[&quot;Central_Meridian&quot;,35.20451694444445],PARAMETER[&quot;Scale_Factor&quot;,1.0000067],PARAMETER[&quot;Latitude_Of_Origin&quot;,31.73439361111111],UNIT[&quot;Meter&quot;,1.0]]</SRS>

</PAMDataset>

 

What might be the best practice to move the raster with the value (-50000, -500000) other than applying the shift tool?

 

However, we are forced to convert them from ecw to jpg due to the fact that the ArcGIS Server doesn’t support ecw when it comes to publishing.

 

 

 

 

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
DanPatterson_Retired
MVP Emeritus

It is the png's world file *.pnw that I would be interested in seeing.  In theory, subtracting those values prior to shifting that would save you the shifting slowness

JamalNUMAN
Legendary Contributor

The pgw and aux are attached

Thank you

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
DanPatterson_Retired
MVP Emeritus

As a test, and if I read you right, I just subtracted 50,000 from X and 500,000 from y in your arl-3.pgw yielding.

Rename arl-3.pgw to arl-3.old 

copy and paste the below into a text editor (ie Notepad) and name it arl-3.pgw. and save it in the same folder.

Add the image

Does it line up properly?

0.5000000000
0.0000000000
0.0000000000
-0.5000000000
169980.0000000000
170020.0000000000
JamalNUMAN
Legendary Contributor

Replacing the values of the pgw with the ones you have provides does stick the raster in the right place.

Does this mean that need to subtract the (-50000, -500000) from each pgw files in order to stick the 1600 raster in their correct position?

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
DanPatterson_Retired
MVP Emeritus

yes... time for some scripting to

  • read the *.pnw, rename them *.pnw_old,
  • get the appropriate lines containing the X, Y values,
  • do the math and
  • save the file out to a new copy so as to retain the old.

You wouldn't want to do this manually... even though it would be quicker than shifting.

 

BojanŠavrič
Esri Contributor

Hello Jamal NUMAN! I just want to verify if I understand your comment correctly. Were you not able to line-up your data using any of the transformation paths below in map properties or by projecting it with project tool and available transformation paths below? Thanks!

JamalNUMAN
Legendary Contributor

Correct. None of the transformations paths make the data line-up precisely.

 

Despite the fact that the “Israel_TM_Grid” coordinate system is based on “GRS_1980” Spheroid and “Transverse_Mercator” projection while the “Palestine_1923_Palestine_Grid” is built from“Clarke_1880_Benoit” and Spheroid “Cassini” projection:, they can be converted from one another by subtracting\adding (50000, 500000) to their x and y respectively.

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
ArwaShaqour
Occasional Contributor

Hi All,

I managed to develop a python script that performs the required action as shown in the screenshots below. However, I’m struggling at the moment in how to create a tbx tool that can be used to run the script. The script is attached.

Ahmad SALEH‌ , Jamal NUMAN‌ 

Best,

Arwa

AhmadSALEH1
Frequent Contributor

Arwa,

There are two approaches to get this job done, the most simple and easy one is by creating a script tool .

But first,  you have to edit your script to access the parameters via GetParameterAsText() "see the attached file".

then go to arcmap > create a new toolbox 

 right click on the toolbox>add>script and follow  the snapshots below

let me know  if you have any questions,

Thanks,