logo
spacer image for formatting
FAQ Log in spacer image for formatting
Search Profile spacer image for formatting
Memberlist Usergroups spacer image for formatting
Log in to check your private messages spacer image for formatting
Register spacer image for formatting
top border image
spacer image for formatting
HiRise to ArcMap
Goto page 1, 2  Next
post new topic: Post new topic   post reply: Reply to topic
Isis Support Center Forum Index » Planetary GIS Datasets - Mars » HiRise to ArcMap
View previous topic :: View next topic  
Author Message
lkincy
Anubis (Very Active Member)
Anubis (Very Active Member)


Joined: 12 Apr 2006
Posts: 50
Location: TX State Univ.

 mini post alt: Post Posted: Mon Nov 12, 2007 12:01 pm    Post subject: HiRise to ArcMap
Reply with quote

Hello. I have a couple of HiRise iamges. I downloaded the jpeg versions with projection and the label files. I ran the pds2world -J command on them to produce the .jw2 files. After importing the files into to ArcMap, I set the geogrphic coordinates to Mars 2ooo.

The images have the correct latitude, but not the correct longitude. The longitude is always 0.

I noticed in both .jw2 files two lines have 0.0. What are these two numbers?

For PSP_004145_1455_RED the .lbl file looks like this:
A_AXIS_RADIUS = 3391.159228 <KM>
B_AXIS_RADIUS = 3391.159228 <KM>
C_AXIS_RADIUS = 3391.159228 <KM>
COORDINATE_SYSTEM_NAME = PLANETOCENTRIC
POSITIVE_LONGITUDE_DIRECTION = EAST
KEYWORD_LATITUDE_TYPE = PLANETOCENTRIC
/* NOTE: CENTER_LATITUDE and CENTER_LONGITUDE describe the location */
/* of the center of projection, which is not necessarily equal to the */
/* location of the center point of the image. */
CENTER_LATITUDE = -30.000000 <DEG>
CENTER_LONGITUDE = 329.125000 <DEG>
LINE_FIRST_PIXEL = 1
LINE_LAST_PIXEL = 53016
SAMPLE_FIRST_PIXEL = 1
SAMPLE_LAST_PIXEL = 27560
MAP_PROJECTION_ROTATION = 0.000000 <DEG>
MAP_RESOLUTION = 236747.575980 <PIX>
MAP_SCALE = 0.2500 <METERS>
MAXIMUM_LATITUDE = -34.192550 <DEG>
MINIMUM_LATITUDE = -34.416478 <DEG>
LINE_PROJECTION_OFFSET = -8095001.50000 <PIXEL>
SAMPLE_PROJECTION_OFFSET = 13835.50000 <PIXEL>
EASTERNMOST_LONGITUDE = 329.191937 <DEG>
WESTERNMOST_LONGITUDE = 329.057528 <DEG>
END_OBJECT = IMAGE_MAP_PROJECTION

The .jw2 file looks like:
0.25
0.0
0.0
-0.25
-3458.875
-2023750.375
 Back to top »
View user's profile Send private message Send e-mail
spacer image
fred_calef
Ra (Power Member)
Ra (Power Member)


Joined: 19 Mar 2004
Posts: 94
Location: Albany, NY

 mini post alt: Post Posted: Tue Nov 13, 2007 9:57 am    Post subject:
Reply with quote

Those two zero numbers in the World file are rotation factors that are not used in ArcMap, AFAIK.

If you have a projection file (.prj), then you can use it to assign the proper projection to the image and have it register correctly. Relying on the World file (.jw2) causes the longitude registration error (well, it doesn't provide enough information to register it correctly).

Download the USGS Image Toolset that Trent built from http://arcscripts.esri.com/details.asp?dbid=14345

You can use it to add the projection information from the .prj file to the jpeg2 image.

_________________
+++++++++++++++++++++++
Fred Calef III
Planetary Lab - Geophysical Institute
University of Alaska, Fairbanks
 Back to top »
View user's profile Send private message Send e-mail Yahoo Messenger
spacer image
thare
GIS Support Team
GIS Support Team


Joined: 22 Mar 2004
Posts: 660
Location: USGS Astrogeology Research Program, Flagstaff, AZ

 mini post alt: Post Posted: Tue Nov 13, 2007 10:07 am    Post subject:
Reply with quote

Thankfully the next generation of released HiRISE images will contain an embedded geo header. This means ArcMap and other GIS/RS apps will read the HiRISE geo(jpeg200) automatically including the projection. This was a little bit of a struggle to get this to work but the UofA team managed to figure out how to include it into their processing pipeline. I think at the next PDS release they might re-release all the data such that all are geoJp2s.

For now, if you look at the worldfile (created using "pds2world -J") the cellsize is in meters. By just setting Mars2000 you are implying the image is just in a lat/lon system (no projection) and the worldfile should be degrees/pixel. Since this HiIRSE image is using a Equirectangular map projection you cannot use decimal degree for the worldfile you have to use meters. And thus setting the definition to Mars (e.g. Mars 2000.prj) is just part of the solution.

The projection equation used by HiRISE is a little non-standard so you will need to also create a new definition for Mars (in the PDS label).

1.) in ArcCatalog, when you define a spatial reference, choose “New Projected…”
2.) In the this dialog set a good name “Mars_EquiCyl_clon329_clat-30”
3.) Set the projection (pulldown menu) to “Equidistant_Cylindrical”
4.) Set the Cental_Meridian to the defined label Center_lon = 329.125, Set the Standard_Parallel_1 to Center_lat = -30, leave False_Easting and Northing to 0. If you are working in a -180 to 180 logitude system you can update it here. So the new Cental_Meridian would be equal to: 329.125 - 360.
5.) Under Geographic Coordinate System, hit “New…”
6.) Again give it a good name like “Mars3391159.228”
7.) Set “datum, Spheroid Name to <custom>, set Semimajor and Semiminor to radius in the label 3391159.228 (in meters).
8.) Angular Unit set to Degree and leave Prime Meridian to 0.

Whew. That should be it. Now do it for each image – arg.

Again, the next release should take care of having to define the projection for ArcMap, ENVI, etc. I can’t wait.

Trent


Last edited by thare on Fri Nov 30, 2007 10:33 am; edited 2 times in total
 Back to top »
View user's profile Send private message Send e-mail Visit poster's website
spacer image
lkincy
Anubis (Very Active Member)
Anubis (Very Active Member)


Joined: 12 Apr 2006
Posts: 50
Location: TX State Univ.

 mini post alt: Post Posted: Sun Nov 18, 2007 4:15 pm    Post subject: HiRise to ArcMap
Reply with quote

I was able to map my images. However I had one final step. I had to remove the images and reimport them. Now my problem is I tried the NODATA arcsript tool on one image, to remove the black background, and after 2 hours and 10 minutes, I just got a GeoTiff (I guess) that has a black background.
 Back to top »
View user's profile Send private message Send e-mail
spacer image
thare
GIS Support Team
GIS Support Team


Joined: 22 Mar 2004
Posts: 660
Location: USGS Astrogeology Research Program, Flagstaff, AZ

 mini post alt: Post Posted: Tue Nov 20, 2007 3:35 pm    Post subject:
Reply with quote

Unless you are going to mosaic the images, you don't need to null them as they act like simple 8bit images. Just turn off the background in the symbology tab. Running any process on these images is going to take a while because of their size and just that ArcMap image processing is slow. Try to run several over night if you have to.

Trent
 Back to top »
View user's profile Send private message Send e-mail Visit poster's website
spacer image
lkincy
Anubis (Very Active Member)
Anubis (Very Active Member)


Joined: 12 Apr 2006
Posts: 50
Location: TX State Univ.

 mini post alt: Post Posted: Fri Mar 07, 2008 3:12 pm    Post subject: HiRise to Arcmap
Reply with quote

This method has been working, but recently I've had a couple of images that have the correct longitude, but essentially no latitude (they have a 0 lat). The two differences I've found are:
1. In ArcCatalog Raster Data Set Properties they have no upper and lower extent.
2. In the J2W files the last two numbers are 0.5 and -0.5. While in other J2W files, the last two are like the ones in the previous posting.
 Back to top »
View user's profile Send private message Send e-mail
spacer image
lkincy
Anubis (Very Active Member)
Anubis (Very Active Member)


Joined: 12 Apr 2006
Posts: 50
Location: TX State Univ.

 mini post alt: Post Posted: Tue Mar 11, 2008 6:41 pm    Post subject: HiRise to ArcMap
Reply with quote

I figured out my problems. I originally followed the correct steps, and was able to map several images and shapefiles, but after several weeks, I started using isis2world on the jp2 files, instead of pds2world on the lbl files. The newer images now map. But the newer shapefiles I created from Erdas AOI files still won't map properly. I've tried recreating the shapefiles. I've tried modifying and importing spatial references in ArcCatalog. Any suggestions?
Thanks.
 Back to top »
View user's profile Send private message Send e-mail
spacer image
thare
GIS Support Team
GIS Support Team


Joined: 22 Mar 2004
Posts: 660
Location: USGS Astrogeology Research Program, Flagstaff, AZ

 mini post alt: Post Posted: Fri Apr 18, 2008 4:45 pm    Post subject:
Reply with quote

short-cut.

I have recently added some projection support to the pds2world.pl and pds2world.exe programs to help generate the ESRI Well-Known Text (WKT) projection definition. Appears to work for me. http://webgis.wr.usgs.gov/pigwad/tutorials/scripts/perl.htm

So now just run:
pds2world.pl -J -prj PSP_004145_1455_RED.LBL

batch (*nix):
foreach i (*.LBL)
foreach> pds2world.pl -J -prj $i
foreach> end

batch (dos):
for %i in (*.LBL) do pds2world -J -prj %i

This will generate the Jpeg2000 worldfile and projection file. Now for ArcMap run the "add projection from PRJ" in the USGS Image Toolbox for all your images: http://arcscripts.esri.com/details.asp?dbid=14345


To add into a new converted image you can use gdal_translate (built-in with FWtools). example:
>gdal_translate -of jp2kak -a_srs "ESRI::PSP_004145_1455_RED.prj" PSP_004145_1455_RED.jp2 geo_PSP_004145_1455_RED.jp2

Again the HiRISE released geoJpeg2000 images should be right around the corner - I hope.

-Trent
 Back to top »
View user's profile Send private message Send e-mail Visit poster's website
spacer image
fred_calef
Ra (Power Member)
Ra (Power Member)


Joined: 19 Mar 2004
Posts: 94
Location: Albany, NY

 mini post alt: Post Posted: Mon Apr 21, 2008 12:22 pm    Post subject:
Reply with quote

Hi Trent,

I just tried your shortcut process and it worked succcessfully for several HIRISE images. Smile

I did notice some registration error between overlapping images, e.g. PSP_002039_1545_RED and PSP_002461_1545_RED, but they are relatively in the right place (as per prereferenced MOCNA). One caveat: I'm using the QLOOK images (though I don't think this should matter).

Any thoughts on the datum differences due to the calibration of each HIRISE image with its own unique spheroid based on the center latitude of the image? It would seem to necessitate doing a datum transformation on each image...which sounds tedious to me. Or does ArcMap do this on the fly also?

_________________
+++++++++++++++++++++++
Fred Calef III
Planetary Lab - Geophysical Institute
University of Alaska, Fairbanks
 Back to top »
View user's profile Send private message Send e-mail Yahoo Messenger
spacer image
thare
GIS Support Team
GIS Support Team


Joined: 22 Mar 2004
Posts: 660
Location: USGS Astrogeology Research Program, Flagstaff, AZ

 mini post alt: Post Posted: Mon Apr 21, 2008 12:43 pm    Post subject:
Reply with quote

ArcMap should also "on-the-fly" reproject over the datum also. Remember anything projected on-the-fly in ArcMap is a short-cut method and not as reigorous as actually reprojecting them file to file. There is a setting somewhere to choose a more rigourous on-the-fly method be it probably still cuts some corners.

Trent
 Back to top »
View user's profile Send private message Send e-mail Visit poster's website
spacer image
lkincy
Anubis (Very Active Member)
Anubis (Very Active Member)


Joined: 12 Apr 2006
Posts: 50
Location: TX State Univ.

 mini post alt: Post Posted: Wed May 28, 2008 5:09 pm    Post subject: HiRise to ArcMap
Reply with quote

Thanks Trent for adding this feature to PDS2World. It is a lot simpler.
I have come across one problem. The first image I ever processed,
did so smoothly, but every other image causes ArcCatalog to hang up,
when I select the prj file created by PDS2World.

I have used Windows Explorer to notice that a companion xml file is
created. A good xml file should have a size of 1 or 2 kb, but after
ArcCatalog hangs up, an xml file of over 8,000 kb is created.

I then use notepad to delete most of the file. The deleted part contains
a table of 256 colors data. I had this same problem with the previous
method for projecting HiRise images, and was able to use notepad
to modify the xml files, and finally project the image.

ArcCatalog does not hang up when I use the prj file to project a
shapefile, only a jp2 file.

Any suggestions.
 Back to top »
View user's profile Send private message Send e-mail
spacer image
thare
GIS Support Team
GIS Support Team


Joined: 22 Mar 2004
Posts: 660
Location: USGS Astrogeology Research Program, Flagstaff, AZ

 mini post alt: Post Posted: Thu May 29, 2008 11:11 am    Post subject:
Reply with quote

hmm - can you post the prj file here (just paste it in) and the image number for testing.

-Trent
 Back to top »
View user's profile Send private message Send e-mail Visit poster's website
spacer image
lkincy
Anubis (Very Active Member)
Anubis (Very Active Member)


Joined: 12 Apr 2006
Posts: 50
Location: TX State Univ.

 mini post alt: Post Posted: Thu May 29, 2008 2:43 pm    Post subject: HiRise to ArcMap
Reply with quote

Here is the .prj file for
PSP_005152_1365_RED.JP2

PROJCS["MARS_Equidistant_Cylindrical_Sphere",GEOGCS["GCS_MARS_Sphere",DATUM["D_MARS_Sphere",SPHEROID["MARS_Sphere",3387887.658,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equidistant_Cylindrical"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",198.265],PARAMETER["Standard_Parallel_1",-40],UNIT["Meter",1.0]]
 Back to top »
View user's profile Send private message Send e-mail
spacer image
thare
GIS Support Team
GIS Support Team


Joined: 22 Mar 2004
Posts: 660
Location: USGS Astrogeology Research Program, Flagstaff, AZ

 mini post alt: Post Posted: Thu May 29, 2008 4:55 pm    Post subject:
Reply with quote

Using that image I ran:

1.) pds2world.pl -J -prj PSP_005152_1365_RED.LBL
2.) Using USGS Image Toolbox v1_5, I applied the new prj to the Jp2 using "Batch Set Image Projection from PRJ":
3.) I ran a projection test using "Batch Project Raster".

Now I had to set the output to a ERDAS "img" since my output image was going to be 6.5GB. GeoTiffs, not BigTiffs, have a limit of 4GB. Maybe this is the problem? Other than the GeoTiff issue it seem to work here.

make sure your temp area has plenty of space - these are large.

-Trent
 Back to top »
View user's profile Send private message Send e-mail Visit poster's website
spacer image
lkincy
Anubis (Very Active Member)
Anubis (Very Active Member)


Joined: 12 Apr 2006
Posts: 50
Location: TX State Univ.

 mini post alt: Post Posted: Fri Jun 06, 2008 3:33 pm    Post subject: HiRise to Arcmap
Reply with quote

The Batch Set Image Projection from PRJ step, perhaps works.
I don't get any errors, but what's suppose to happen? Is a new
file to be produced. The image still has no spatial referrence.
Also I get an error with Batch Project Raster. The log ends with this:

Projecting PSP_006003_1320_RED.JP2
Failed to execkute. Parameters are not
valid. Undefined coordinate system for input
dataset.
Failed to execute (ProjectRaster).

Completed script
batch_project_raster...
Executed (batch_project_raster_1)
successfully.
 Back to top »
View user's profile Send private message Send e-mail
spacer image
Display posts from previous:   
Isis Support Center Forum Index » Planetary GIS Datasets - Mars » HiRise to ArcMap
post new topic: Post new topic   post reply: Reply to topic All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
spacer image for formatting
image for the bottom border

If you are having problems logging in, accessing, or using the Isis Support Center, please contact Isis Support Center Administration: isisweb[at]astrogeology.usgs.gov.

USGS Isis Home





Solaris 1.12 phpBB theme/template © 2003 - 2006 Jakob Persson(forumthemes/bbstyles)