How to automate selecting specific xyz map data from an existing xyz data set?
Mostrar comentarios más antiguos
I have a bathymetry map that provides a 1 meter resolution. However, I don't want all of the map data. I want a 1024X1024 meter section of the map so that I can run comparrisons. The xyz map data I have is lat/long/alt and I'd like to automate the process and be able to populate a 1024X1024 matrix with z data.
I have attached a link to the xyz file since it is too large and a .jpg file so that you can see what the map looks like. I've also drawn a blue box around the desired location.

This is a painful process to go cell by cell so I appriciate all help.

7 comentarios
Walter Roberson
el 13 de En. de 2019
The section you are extracting: is it a cuboid aligned with linear coordinates? A cuboid aligned with lat/long coordinates? A cuboid at an angle to linear or lat/long coordinates? An arbitrary shape?
BlkHoleSun
el 13 de En. de 2019
Walter Roberson
el 14 de En. de 2019
This would be a little easier if you used the Shaded Relief Images that are just a couple of links higher up than what you circled. Those are in geotiff form, and the Mapping Toolbox has tools to extract sections from geotiff.
BlkHoleSun
el 14 de En. de 2019
Walter Roberson
el 14 de En. de 2019
Bleh. The tif file is a map reference rather than a geo reference, so it is projected coordinates into some system. Unfortunately the information present there does not appear to talk about what the coordinates mean.
When I load the GeoTiffs directory and look inside the .xml files, I see that it is Transverse Mercator centered around long -123.0 lat 0. There is transform information there but I do not know how to understand it yet.
It looks like it might be Geodetic Reference System 80 (GRS80) ... ah, but looking at other items it looks like WGS84 is also there.
Hmmm, and there that information present using geotiffinfo() projection parameters sub-structure.... But I still do not understand yet how to convert to lat/long. Ah, I made some progress at http://www.rcn.montana.edu/resources/converter.aspx treating the readings as UTM in zone 10N...
(I have done very little map work, so I'm learning as I go along.)
BlkHoleSun
el 15 de En. de 2019
Walter Roberson
el 15 de En. de 2019
A question would be how accurate the boundaries have to be. The map spacing is in physical meters, but imposing lat/long boundaries implies boundaries that are rectilear in physical meters. Your source about 7.3 km by about 6.9 km, which I figure is large enough that the curvature of the Earth would several few meters off of the upper left and upper right if the lat/long boundaries need to be strict.
I would tend to suggest that you just translate the lat/long boundaries at the southern edge and use those to select a rectangular portion of the data instead of worry about the curvature.
Respuesta aceptada
Más respuestas (1)
KSSV
el 15 de En. de 2019
0 votos
Read about inpolygon. If you have the vertices of closed region/ polygon; ou can get the points lying inside the region.
5 comentarios
Walter Roberson
el 15 de En. de 2019
So far the boundaries are expected to be in latitude and longitude, but the data is in Transverse Mercator Projection (basically an unrolled local cylindar.) Effectively the data is in ground distance and lat and long boundaries are curves relative to that. You would not be able to use a rectangular polygon for inpolygon purposes: you would have to approximate the lat/long boundaries by a series of straight lines. A bit of a nuisance at the very least.
BlkHoleSun
el 15 de En. de 2019
BlkHoleSun
el 15 de En. de 2019
KSSV
el 15 de En. de 2019
YOu are welcome..
Categorías
Más información sobre Coordinate Reference Systems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
