I have data that is in 0.5x0.5 degree grid (720x361 points). Is there any reason I cannot create my own GridCell(,)? I noticed a grid file starts with somthing like:
ncols 141
nrows 80
xllcorner -131.6015625
yllcorner 17.1875
cellsize 0.507568359375
NODATA_Value -9999
Followed by the data values which I assume are bottom row to top row, left to right. Any reason I can’t generate this file and use “cellsize” of .5 and the appropriate values for the other parameters?
Problem is, there appears to be no way to use a file to generate the GridCell for InMemoryGridIsoLineLayer.
Reason I am looking to do this is that the grid creation process seems to take the most time when generating isoloines as it interpolates the grid values but I can create it in a second.
Thanks!
Mike
Use existing Grid data instead of GridDefinition
To follow up, after looking at API docs… can I just create my own GridCell(,)? It looks like GridCell has a constructor that takes lon, lat, value and I assume the array is rows and columns, bottom to top, left to right?
Hi Micheal,
Thanks for your post,
About the first post:
actually here is a sample for InMemoryGridIsoLineLayer: wiki.thinkgeo.com/wiki/File:ServicesEditionSample_Isolines_CS_WPF_111115.zip
In it, there is a function "GridFeatureSource.GenerateGridMatrix(…)" in "CreateGridCellMatrix()" in sample.xaml.cs to create GridCell(,) for InMemoryGridIsoLineLayer
About the second post:
you could create your own gredcell(,), but I recommend you to use "GridFeatureSource.GenerateGridMatrix(…)" because it could save your energy for the coding.
Hope it helps
Summer