Skip to main content
Solved

JPEG 2000 location is incorrect

  • November 24, 2021
  • 4 replies
  • 48 views

carmijo
Contributor
Forum|alt.badge.img+11

I have a jp2 and jpw file. Reading the jp2 results in the data inspector showing the resulting data in the wrong location. How can I fix the location? I've tried setting the coordinate system on the reader but that doesn't fix it. I know the j2w file holds information about the location of the jp2 but I don't know how to read it along with the jp2. I know I'm likely missing something simple so I appreciate the help.

Best answer by redgeographics

carmijo wrote:

the xy matches where it's being shown in data inspector but they're not the xy of the actual location.

Okay, your j2w file is wrong then. If the pixel sizes are correct and you know what the x and y should be you can simply use an Offsetter to move it to the correct location. If it's a one-time thing you may also simply edit the file manually. If this has to be done more often you should check with whoever is supplying the file though.

View original
Did this help you find an answer to your question?

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+46

If you open the j2w file in a text editor you should see 6 lines, lines 1 and 4 contain the pixel size in x and negative y direction, lines 5 and 6 are the x and y coordinates of the center of the top left pixel.

 

Do those values match what you expect to see?


carmijo
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • November 29, 2021
redgeographics wrote:

If you open the j2w file in a text editor you should see 6 lines, lines 1 and 4 contain the pixel size in x and negative y direction, lines 5 and 6 are the x and y coordinates of the center of the top left pixel.

 

Do those values match what you expect to see?

the xy matches where it's being shown in data inspector but they're not the xy of the actual location.


redgeographics
Celebrity
Forum|alt.badge.img+46
  • Celebrity
  • Best Answer
  • November 29, 2021
carmijo wrote:

the xy matches where it's being shown in data inspector but they're not the xy of the actual location.

Okay, your j2w file is wrong then. If the pixel sizes are correct and you know what the x and y should be you can simply use an Offsetter to move it to the correct location. If it's a one-time thing you may also simply edit the file manually. If this has to be done more often you should check with whoever is supplying the file though.


carmijo
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • November 29, 2021
carmijo wrote:

the xy matches where it's being shown in data inspector but they're not the xy of the actual location.

I see. Thank you


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings