Question

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

  • 3 February 2020
  • 3 replies
  • 1 view

Badge +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

Badge +10

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.

Userlevel 4
Badge +13

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

Userlevel 1
Badge +21

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

Reply