Skip to main content
Question

How to convert the origin point of a raster into a vector point?


nicholas
Contributor
Forum|alt.badge.img+10

Hello all,

 

I want to generate a vector point from the origin point of a raster.

My raster is an ecw (version 2) format.

I can expose the coordinate values of the origin point by using RasterPropertyExtractor

But, I fail to create the vector point with VertexCreator. I assume this is because the raster still exists and I cannot add a vector point to a raster feature. If I could replace the raster with the vector point, this would work for me.

3 replies

nicholas
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • February 3, 2020

I thought I might be able to the RasterSubsetter to grab just the top-left pixel and then use RasterCellCoercer to convert that pixel into a point.

This works, but I'm not happy with the result. There is a small shift in the coordinates of the output point.

coordinate units is metres. Coordinate system is GDA-94 Zone 56

The origin point of the original raster

_origin_x : 466000

_origin_y : 6972000

coordinates of output point

x : 466000.14999999997

y : 6971999.850000001

So there is a very small shift in the coordinate that I want to avoid.


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • February 3, 2020

Hi @nicholas Use a VertexCreator to make the point from the _origin_x and _origin_y attribute values.


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • February 3, 2020

The vertex creator should work as long as you have mode set to "Replace with point"


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