comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Using "tie points" in rasters
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Using "tie points" in rasters [message #93199] Wed, 11 May 2016 14:35 Go to next message
GB is currently offline  GB
Messages: 2
Registered: May 2016
Junior Member
Hello,

I am working with a digital elevation map raster and ran into a problem that I am unsure how to approach.

Once I get the spatial reference object of my DEM raster, I then get the tie_point_pixel, the tie_point_map, and pixel_size from the spatialref. I then seek to transform the map coordinates of a set of LiDAR points into the pixel indices of my raster. The thing I am confused about is how rounding plays into this problem.

For instance, lets say that I use the following function to convert the x-coordinate of my lidar point into pixel coordinates:
(lidar_point_x-tie_point_map[0])/pixel_size[0]
But, I get a decimal place in the outcome. Lets say that the decimal point is 0.64. Would this decimal point translate into the point belonging to index 0 or to index 1?

I suppose I am confused about if the tie_point_map is centered on the tie_point_pixel such that it extends a range of -0.5*pixel_size to 0.5*pixel_size. If anyone could elaborate on this I would be very thankful.
Re: Using "tie points" in rasters [message #93202 is a reply to message #93199] Wed, 11 May 2016 20:21 Go to previous messageGo to next message
jiashenyue is currently offline  jiashenyue
Messages: 10
Registered: January 2013
Junior Member
On Wednesday, May 11, 2016 at 2:35:04 PM UTC-7, GB wrote:
> Hello,
>
> I am working with a digital elevation map raster and ran into a problem that I am unsure how to approach.
>
> Once I get the spatial reference object of my DEM raster, I then get the tie_point_pixel, the tie_point_map, and pixel_size from the spatialref. I then seek to transform the map coordinates of a set of LiDAR points into the pixel indices of my raster. The thing I am confused about is how rounding plays into this problem.
>
> For instance, lets say that I use the following function to convert the x-coordinate of my lidar point into pixel coordinates:
> (lidar_point_x-tie_point_map[0])/pixel_size[0]
> But, I get a decimal place in the outcome. Lets say that the decimal point is 0.64. Would this decimal point translate into the point belonging to index 0 or to index 1?
>
> I suppose I am confused about if the tie_point_map is centered on the tie_point_pixel such that it extends a range of -0.5*pixel_size to 0.5*pixel_size. If anyone could elaborate on this I would be very thankful.

Usually I just round the decimal points to the closest pixel. If I got a index of 1.64, I go for 2. I would say this is quite fair, since in this case, the pixel you are trying to locate is closer to the next pixel.

Shenyue
Re: Using "tie points" in rasters [message #93205 is a reply to message #93202] Thu, 12 May 2016 05:52 Go to previous message
GB is currently offline  GB
Messages: 2
Registered: May 2016
Junior Member
On Wednesday, May 11, 2016 at 11:21:31 PM UTC-4, SHENYUE JIA wrote:
> On Wednesday, May 11, 2016 at 2:35:04 PM UTC-7, GB wrote:
>> Hello,
>>
>> I am working with a digital elevation map raster and ran into a problem that I am unsure how to approach.
>>
>> Once I get the spatial reference object of my DEM raster, I then get the tie_point_pixel, the tie_point_map, and pixel_size from the spatialref. I then seek to transform the map coordinates of a set of LiDAR points into the pixel indices of my raster. The thing I am confused about is how rounding plays into this problem.
>>
>> For instance, lets say that I use the following function to convert the x-coordinate of my lidar point into pixel coordinates:
>> (lidar_point_x-tie_point_map[0])/pixel_size[0]
>> But, I get a decimal place in the outcome. Lets say that the decimal point is 0.64. Would this decimal point translate into the point belonging to index 0 or to index 1?
>>
>> I suppose I am confused about if the tie_point_map is centered on the tie_point_pixel such that it extends a range of -0.5*pixel_size to 0.5*pixel_size. If anyone could elaborate on this I would be very thankful.
>
> Usually I just round the decimal points to the closest pixel. If I got a index of 1.64, I go for 2. I would say this is quite fair, since in this case, the pixel you are trying to locate is closer to the next pixel.
>
> Shenyue

That is what I was thinking. I was just confused about whether or not the tie_point_map was centered on the pixel or denoted the upper left-hand corner of the pixel.

Thanks for the help.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Dark theme for IDL?
Next Topic: Plot radiances vs wavelengths

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:17:38 PDT 2025

Total time taken to generate the page: 0.00584 seconds