Hot answers tagged datastructure
If your software doesn't support multi-part features you may have to go to extraordinary and complicated lengths to execute spatial operations. For example, the intersection of two polygons can, in general, have more than one connected component. It is convenient, both algorithmically and conceptually, to suppose that such an intersection returns a single ...
Many arcpy functions that take multiple inputs accept Python list objects. For example the Dissolve_management function accepts a list of field names to dissolve on: arcpy.Dissolve_management("taxlots", "C:/output/output.gdb/taxlots_dissolved", ["LANDUSE", "TAXCODE"], "", "SINGLE_PART", "DISSOLVE_LINES") A tuple can be used in place of a list when ...
Blah238 covers this topic well, so I will just add a couple of examples from my own work. I develop a lot of airport data, and one of the things I have to do regularly is read in order along the surveyed runway centerline points from a runway. You'd think that these points would be in order (in the GIS database) already, but they rarely are. The ...
Imagine joining population data to a table of single-part polygons representing countries. Depending on how you do the join, either every island would get the full population of that country or only one polygon of the set would get the full population. Without representing the country as a multi-part polygon you have to either apportion the population ...
E00 is a proprietary ESRI file format intended to support the transfer between ESRI systems of different types of geospatial data used in ESRI software ( Old systems anyway, people use the ESRI file geodatabase now ). Usually, people then convert to coverages and work with those, they don't use the E00 file directly (somebody correct me if I'm wrong). I ...
R-trees are indeed a great choice. Depending on your platform you might be able to find working implementations so you don't have to go through the pain. A simpler alternative is to use Quadtrees (which are a special case of R-trees, thus simpler) that may be suitable enough for your use case.
Some online resources: Spatial Data Structures for Spatial Databases Spatial Data Structures for Computer Cartography Spatial Data Structures lecture slides from Carnegie Mellon University
I too love dictionaries - use 'em all the time. This method gets some spatial reference properties and stores it all in a dict: def get_coord_sys(self, in_dataset): """Get and return info on dataset coord sys/projection""" spatial_ref = arcpy.Describe(in_dataset).spatialReference # Get spatial ref props and put in dictionary spat_ref_dict = ...
Alternatively, you could use the GDAL/OGR Java bindings to read in the E00 files.
This is an old format, shapefile, personal and file geodatabases are more commonly used today. Note: ESRI never released any specification on this format. The following information is on a best guess (though highly accurate from experience.) The E00 (E01,E02,E03,E0n) is much more that you think from the following Arc/Info Export (E00) Format Analysis: The ...
I know it's not online, but amazon is so easy...you said 'comprehensive' so I'd recommend Computational Geometry. If you're actually building data structures, not just using them, than this book is a good friend. Many examples are in pseudocode, The mathematical proofs are fairly dense but can be ignored. I forgot about the Samet Spatial Data Structures ...
R-Trees if your data is sparse (which it very likely is). If you have dense data you can store a tile-based system, a 2-D array or jagged array (array of arrays). I would avoid linked lists but it depends on what you are trying to accomplish.
While it isn't specifically addressing examples, the Using Key-Value Stores for Geospatial Data question has a number of examples listed, along with a few ideas about how to implement it for your own needs. This is certainly an emerging area of interest, a few upcoming talks from the FOSS4G conference: GeoCouch: A Spatial Index for CouchDB Geospatial ...
I just finished reading GIS Basics by Stephen Wise. It is an excellent book, on how Various types of GIS data is Structured. It also deal with some basic GIS algorithms and would be a wonderful starting point. I know that it is not an online reference, but you can use Amazon's Look Inside to see a few pages.
Take a look at the implementation of "com.vividsolutions.jts.index.strtree.STRtree" in JTS. "A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm"
The answer to this question is subjective, and really it depend on the content your serving up. My experience, one of the main reasons for storing services in different folders is more important when administering security with ArcGIS Server. i.e. A simplistic approach is to have all open services in the root folder, and then services grouped per role in ...
Not answer but only way to make long comment about test that OP made. Test data Finnish OSM routing table, 379293 lines (allmoust 400k lines) OP had 300k lines. Test machine was highend desktop i7 + 8G ram , database on normal hardisk, database postgresql 9.2 , non default conf. (Table size 118Mb , Index Size 44Mb. Shared memory 2G) select count(*) ...
Simply export it to MIF file type (MapInfo's human-readable file interchange format). This creates a *.mif and a *.mid file. The .mif is what you need: after the header there's a section that lists the data COLUMNS by name with accompanying data type.
If you are on Win7 etc, learn to use Recent Places, it will be a benefit for all the software you use. Have your default folder view settings to 'details' with sort by date. Also consider establishing shortcuts in folders or the next level of sophistication, Libraries, which are available from nearly all file dialogs. For instance I have a library ...
QGIS automatically stores and loads data to and from the directory last used. So simply create a new data directory somewhere else in your file system, and QGIS will use that as default, unless the directory last used is deleted or removed (e.g. on a USB stick).
Read this while putting together an answer and had to make some edits.. I'm no Python expert but I think the idea behind using classes is that you can instantiate an object that has a bunch of methods ready to go which relate to the data structure as well as centralizing your methods. There is also some variable scope benefits with classes vs modules, the ...
In addition to the resource already mentioned, I'd strongly recommend checking out Simon Greener's site, SpatialDB Advisor. It's been a great resource for me over the years.
Try and get an online copy of ESRI's excellent book, whose name escapes me, about data structures: Modeling our world: the ESRI guide to geodatabase design And another is: Geographic information systems and science by Paul Longley, available on Google books and has a chapter on what you are looking for. Try the ESRI book store as well. It has some ...
Depending on your needs and data as other posters have touched on it is best to use different methods. If you need a robust and fast application you are best to not use just one data structure but to rather support multiple data structures for different data sets. If you are having trouble understanding how to create an R-tree index and your data isn't crazy ...
Only top voted, non community-wiki answers of a minimum length are eligible