Welcome, Guest
Username: Password: Remember me

TOPIC: Map Objects with ascii grid: interpolation method?

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40895

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 529
  • Thank you received: 139
I did a little googling... it seems that, according to a comment from 2016, this is a defect in the way that the ASC file is being written. See https://gis.stackexchange.com/a/192294

Ok. I'm in agreement with adding something into Blue Kenue to be able to override an incorrectly written ASC file header.

Stay tuned...

Kindly,
Alan
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40896

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 529
  • Thank you received: 139
Notice that the ArcGIS Help 10.2 documentation clearly defines what xllcorner and xllcenter are supposed to do.

So, if I add an override, then people will have know that their header is incorrect and that such an override needs to be applied.
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40897

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 529
  • Thank you received: 139
ok... reading the documentation is helping me to understand what is going on

First, Blue Kenue is wrong and needs to be fixed according to: this link

And I quote:
The header keywords can be in upper or lower case. The header information is followed by cell data; numeric values are ordered by column within row. Within each row, values are delimited by spaces and rows are separated by a carriage return. Either integer or floating point numbers can be used for the individual data values. The spatial location of the raster is specified by the location of the lower left cell, and by either the center of the lower left cell or the lower left corner of the lower left cell.
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40900

  • pilou1253
  • pilou1253's Avatar
  • NOW ONLINE
  • openTELEMAC Guru
  • Posts: 582
  • Thank you received: 105
Hi!

Thanks for the googling.
We arrived to the same conclusion I think. A dialog box asking for overriding or not seems the best choice I think?

Kind regards
PL
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40901

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 529
  • Thank you received: 139
The way I understand it, no dialog is needed because the values in the ASC grid must be for CELLs. So... Blue Kenue is wrong.

I'll create a new alpha this afternoon (today) and you can try it out... after I add something into the Blue Kenue reference manual about this.

I'm glad that you kept on persisting with this point and I apologize that it has been incorrectly implemented in Blue Kenue for so long!

Kindly,
Alan
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40902

  • pilou1253
  • pilou1253's Avatar
  • NOW ONLINE
  • openTELEMAC Guru
  • Posts: 582
  • Thank you received: 105
No problem! :-)
It will be very nice to skip do the manual shift!

PL
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40904

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 529
  • Thank you received: 139
Using your example + one of mine for "center", this is now what is imported into Blue Kenue. I believe that is now the correct interpretation. I'll add this image into the Reference Manual too.

2022-08-25_ImportingASCgrid.png


Kindly,
Alan
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40905

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 529
  • Thank you received: 139
Probably this image is more clear for people. The ASC grid is the coloured bit, while the black dots are what is being imported into Blue Kenue. Blue Kenue is treating the black dots as a 2D Rect Scalar; hence the reason why interpolation can occur when using Blue Kenue.

2022-08-25_ImportingAnASCgridIntoBK.png


Kindly,
Alan
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40906

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 529
  • Thank you received: 139
Shoot... that visualization isn't quite right. AND changing the Rendering to "Fill Square" also isn't quite right. I will have to add another rendering type. I'll call it "Raster" to help make the rendering more clear.

Stay tuned...

Kindly,
Alan
The administrator has disabled public write access.

Map Objects with ascii grid: interpolation method? 1 year 8 months ago #40907

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 529
  • Thank you received: 139
Ok... I've added a new "Rastor" rendering for 2D Rect Scalar objects (and an ASC grid is imported into Blue Kenue as this type).

2022-08-25_NewRastorVisualizationForRect2DScalar.png


LEFT: A wireframe that is drawn from point to point. For an ASC grid this means from the center of the CELL to the center of the next CELL.

RIGHT: The point is centered on a CELL and a square (rectangle) is drawn around it based on the CELL's size. Therefore, the right image will be larger than the left image by 1/2 CELL width + 1/2 CELL width = 1 CELL width.

Kindly,
Alan
The administrator has disabled public write access.
Moderators: Serrer, a.barton

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.