How do i query a database of X Y Points that are within a certain area?
Query database of X Y Points
Michael,
What kind of database you used? We support many spatial databases such as Oracle Spatial, Postgre, Mssql2008 Spatial etc, if yours is one of them, you can easily use our API such as FeatureLayer.FeatureSource.SpatialQuery() to do a spatial query. If your database is just include simple table with X/Y column to represent points, you probably need to loop through all records to calculate by yourself, we support RtreeSpatialIndex which will help you build the index to optimize the performance.
Let me know if my guess is not what you want.
Thanks,
James
I have the data in the following format:
X Y HSE_Income Type_Dwelling MI_STYLE MI_SQL_REC_NUM MI_SQL_X MI_SQL_Y MI_SQL_MICODE
27.960493 -26.093064 B House 1 27.960493 -26.093064 AJBMGPOAHFAHMIOGD
27.960584 -26.093242 B House 2 27.960584 -26.093242 AJBMGPOAHEFNBODCE
27.960737 -26.093459 A House 3 27.960737 -26.093459 AJBMGPOAHEEOBDJGC
27.960874 -26.093642 B House 4 27.960874 -26.093642 AJBMGPOAHEBOKJCGJ
27.960989 -26.093824 A House 5 27.960989 -26.093824 AJBMGPOAHECBNDBCF
27.96118 -26.094064 B House 6 27.96118 -26.094064 AJBMGPOAHBHCINPDK
27.9613 -26.09422 B House 7 27.9613 -26.09422 AJBMGPOAHBGIGJEEO
27.961479 -26.094407 A House 8 27.961479 -26.094407 AJBMGPOAHBDKCNNPK
27.961607 -26.094635 B House 9 27.961607 -26.094635 AJBMGPOAHANEFMNMN
27.960809 -26.09433 A House 10 27.960809 -26.09433 AJBMGPOAHBBOIAGEJ
27.960789 -26.094697 A House 11 27.960789 -26.094697 AJBMGPOAHAFLDNHJK
Michael,
You can extent our FeatureLayer to support your data format. Sorry we couldn’t provide your sample code here because we are very busy recently.
You can find them at our online video and sample code that teach you how to integrate custom data formats, gis.thinkgeo.com/Products/GI…fault.aspx
Thanks
James
James,
Can i not perform a Query and then from that query extend your feature layer?
Michael,
Yes, you don’t need to performa a query and just extend our FeatureLayer, as you know, feature layer includes a FeatureSource, so that you create a custom feature source inherit from FeatureSource, and then override the method SpatialQueryCore.
Thanks,
James