I have a requirement to create a GRID for a farm field using pH soil sample data, very similar to the example provided here
wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_All_Samples#Create_GRID_2
I can get my code and data working as in the sample. However, rather than displaying a grid that is rectangular (using the bounding box of the field) I need to display on the data that is contained only within the boundary of the field. The boundary will either come from a shape/tab file or stored in a SQL database. Is there an easy way to achieve this?
Also, is there any way to create and display the GRID without having to store it in a .grd file? If possible I would prefer to do this in memory rather than create .grd files on the server.
Thanks
Simon
Creating GRIDs
Hi Simon,
Have you tried to modify the gridExtent value in GenerateGrid function of the sample? I think modify can generate a specified grid file but not for current extent.
For your 2nd question please see this link which should be helpful: thinkgeo.com/forums/MapSuite/tabid/143/aft/12443/Default.aspx
Regards,
Don
Hi Don
I’m not sure what you mean. The gridExtent used by the GridDefinition must be a RectangleShape but my field boundaries are either PolygonShape or MultipolygonShape. I thought there would be a way to create the GRID using the bounding box of the field polygon and then clip/crop the grid to the shape of the field.
I will have a look at the link you provided and see if that works for me.
Thanks
Simon
Hi Simon,
I am sorry but we can only generate the grid file by an rectangle area but not be a polygon.
I think if your data is polygon, the invalid part should be filled by the noDataValue.
Regards,
Don