ThinkGeo.com    |     Documentation    |     Premium Support

Grid Layer

In the whitepapers for 2.0 there is an exsample hov to interpolate between points, the exsample uses GridLayer, with takes an file in the constructor.


In 3.0 the GridLayer also takes an file. Is it realy right that the only why to define an Grid is using an psysical file, i will prefer to have my grid in memory.


The intended use is an layer with with points, and then define a grid with interpolated values, and then draw them on the graph, all data is stored in an MySQL server.



Lars, 
  
 Welcome you to ThinkGeo MapSuite Desktop Forum! 
  
 I think currently the GridLayer in MapSuite v2 and MapSuite v3 only support passing a physical file. 
  
 If you want to support an memory grid or SqlServer2008 grid, you can write your own GridFeatureSource which inherits from FeatureSource and GridFeatureLayer inherits from FeatureLayer. 
  
 Also, if you save your grid data into a physical file, it can satisfy all of your requirements? 
  
 Any more questions just let me know. 
  
 Thanks. 
  
 Yale 


Thanks for your replay.


About saving grid data to file:


The application loads datapoints (logitude, latitude, value) from database, i don't have any grid data in the database, so

the grid has to be created in runtime and presented in runtime, wherefore the performence will suffer from the file solution, i have to make an derived version.



Lars, 
  
 Thanks for your post,  probably I am not making myself clear enough! 
  
 My original attempt is to make sure your runtime grid generation in memory content should be identical with the grid file; the only difference is it locates in memory instead of a physical file. 
  
 You know, the grid .grd file is a standard file format which should contains the column count, row count, low left corner coordinate, cell size etc information, you can see it through the file in the package: 
 C:\Program Files\ThinkGeo\Map Suite Desktop Full Edition 3.0 (BETA)\Samples\SampleData\Data PhValues.grd 
  
 Any more information just let m know. 
  
 Thanks. 
  
 Yale 


Hi again, i can’t find exsamples on deriving feature source, my knowledge about your framework is at beginner state, 
 it would be nice with an exsample how to solve the above problem. 
  
 /Lars

Lars,


Attachment contains the sample which use the steam instead of physical file for the grid.


Any more questions feel free to let us know.


Thanks.


Yale

 



1083-Post6122_Sample.zip (12.3 KB)