JPEG2000 (.jp2) file header - need to change units in

JPEG2000 (.jp2) file header - need to change units in

KDAddison
Enthusiast Enthusiast
312 Views
3 Replies
Message 1 of 4

JPEG2000 (.jp2) file header - need to change units in

KDAddison
Enthusiast
Enthusiast

I have a JPEG2000 raster that based on testing I strongly suspect has somewhere in its header data a part telling it that its units are feet and Map3D picks this up when using IINSERT. (I've tested that it overrides the Map3D 'modify correlation' defaults)  This should be inches and I'd like to change what is in the header.  How can I do this?  Motivation: Previous raster data from this source already had this in the header correctly, but the latest raster has it incorrect.  I can adjust the units in program to get the correlation correct, but the existing & future users I'm preparing this raster are used to just being able to IINSERT without modifying the correlation; so I'd like to make this like the all the others and drop in correctly with no correlation adjustment's needed.  Can this be done?

0 Likes
Accepted solutions (1)
313 Views
3 Replies
Replies (3)
Message 2 of 4

ChicagoLooper
Mentor
Mentor
Accepted solution

@KDAddison 

J2000, MrSID, and geotiff formats all have their projection built into the header. Other formats such as jpeg, tif, and png must have a separate corresponding ‘WORLD file’ for proper image insertion. 

 

You can’t change the original projection that’s in the header. The header was established by the image’s author when the image was originally created. You can make a copy and re-project the copied file but you cannot change the original projection. 

 
If you are running Map3D, you’re better off running something other than IINSERT. That’s a Raster Design command, not a geospatial Map3D command. FYI, M3D has more appropriate commands to handle geospatial formats such as J2000. 

First, you’ll need to assign an appropriate coordinate system. Your drawing units will adopt or inherit the units of that assigned CS and that means you'll be using either Feet or Meters, not inches. Never ever. There are no ' known coordinate systems' that use inches. 

If you don’t assign a CS your image won’t know where to plop down in modelspace and this means the image won’t be consistent with Bing imagery. Same with other geospatial linework you downloaded or acquire from others, they won't be geospatially accurate if there's no assigned CS.

 

If you’re an advanced and experienced Map3D user, connect to your J2000 using the Data Connect Palette. Be sure you know the native CS given to the J2000 by its original author…..if M3D reads the image’s projection incorrectly you can manually correct it by overriding it. As long as the image has a valid projection Map3D will perform any needed transformation from the native CS (or your overriding CS) to your assigned CS.


Or you can use Map3D's MAPIINSERT command. This procedure will also convert the image’s native units to the units used in your assigned CS (such as meters to feet).

 

If your drawing is using inches instead of feet then you’ll need to convert the drawing from inches to feet beforehand. You can’t convert a coordinate system to inches.

 

If your drawing is using inches, your X/Y units (eastings, northings) would NOT be consistent with any projection, meaning all objects would be in the wrong spot because their coordinates wouldn't be in feet. Your workflow should be (1) convert to feet then (2) assign an appropriate CS  (MAPCSASSIGN) like a CS that uses feet, such as State Plane with the appropriate Zone. There are no coordinate systems that use inches. 

If you don’t  assign a CS at all, then your drawing would NOT be geospatial and you might as well use the non-geospatial ATTACH command to insert it which is the same command used by those who only draw using plain vanilla AutoCAD. 

Chicagolooper

EESignature

0 Likes
Message 3 of 4

KDAddison
Enthusiast
Enthusiast

Thanks, yeah FDO connect seems to be the way to go with this.  I wish I could figure out why MAPIINSERT fails, I found a program to read the header, and it was never defined in anything but feet, with no scaling factors or anything that looked like it would screw up the units.  Must be something more obscure.  It's kind of a moot point since I can get it to work, I just like to know why when things don't work.

0 Likes
Message 4 of 4

ChicagoLooper
Mentor
Mentor

If you use MAPIINSERT would i be possible to upload two screenshots? The Source tab and the Insert tab?

 

Chicagolooper

EESignature

0 Likes