Tag Info

Hot answers tagged

23

PostGIS based on PostgreSQL is a popular database for GIS. I haven't used it much myself, but a pro is that it's open source and that many other GIS uses it so it have an active GIS community.


17

If your dataset is added to and updated often, then INSERT, DELETE and UPDATE statements which cause the index to be rebuilt may slow the database down. For bulk inserts, such as loading the entire OSM dataset into a database, it may be quicker to drop the indices and create them again afterwards. If it is more efficient to ignore an index (for example ...


11

Is this a desktop application or, say a Silverlight application? If it is web-based you have to jump through some hoops. You could create a view that exposes WKT and then parse the WKT client side into WPF / Silverlight geometries. If it is a desktop application you've got it quite a bit easier. There is a good example at the Code Project of an SQL Geometry ...


9

SQL Server 2008 comes with geospatial capabilities in-built. Even the free Express Edition supports the full geospatial features, as far as I know. Further reading: SQL Server 2008 Spatial Data MSDN: Working with Spatial Data (Database Engine) MSDN: Working with Spatial Indexes (Database Engine) Basic example from Stack Overflow


9

Since you've tagged the question for ArcGIS 10, check out Query Layers: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_a_query_layer/00s50000000n000000/ I've used it to connect to non-ArcSDE SQL Server 2008 databases. You get to it from the file menu: And there is a couple of other screens that walk you through defining what ...


9

I was able to get this to work: http://dl.dropbox.com/u/2654618/la_goog.html Here's a screenshot: As I said in my comment, I reformatted your raw data. I did this with some python and a little hand-jamming. The resulting JSON is here: http://dl.dropbox.com/u/2654618/la_geom.json That's the Esri JSON format for a polygon. The link above converts the ...


8

No. Transform - ability to transform from one spatial ref to another: No - need 3rd-party tools, Geometry can use any SRID between 0 and 999999. Spatial Tools free CLR add-on does provide limited transform support. Source: http://www.bostongis.com/PrinterFriendly.aspx?content_name=sqlserver2008r2_oracle11gr2_postgis15_compare


8

The units of the project 4269 are decimal degrees, so probably your answer reflects that bias, if you are using the 'Geometry' type. If you want more useful units, try loading your spatial data using the 'Geography' type, or re-project it to a local planar projection in order to use the 'Geometry' type.


7

Here you go: IFeatureLayer fl = ...; string tablename = ((IDataset)fl.FeatureClass).BrowseName; Link: IDataset.BrowseName API Docs


7

In ArcMap, If you look up Search in Polygon in ArcMap, you'll find this: "Select By Location to select those features from the points layer that intersect the polygon layer" That's found by "Selection>Select by Location" on the menu bar and it will ask for a Target layer then a Source layer and a selection method. So the Target layer is your point layer, ...


7

While I can't answer for anyone else, and the company is not large that I work for, we have had a lot of success with using SQL Server 2008 and it's spatial capabilities. Because I work for a forestry company, the spatial side of things is very important to our business. If you are just doing nearest neighbour type analysis, then I would suggest giving the ...


7

Michael, A few more details on ArcSDE. Using ArcSDE you can store spatial data in basically 2 formats. Either using the SDE native format (which is a BLOB), OR depending on the database you use (SQL Server, Oracle, PostGIS, i think DB2 spatial as well) in the respective database native format. Which for Oracle for example, is the SDO_GEOMETRY type and for ...


7

There are no built-in checks for this in OpenLayers, but it should be possible to implement one quite easily. The Polygon class has a Components property which holds several LinearRings, the first ring beeing the outer ring and the consecutive ones (if any) represents holes. To find self-intersections you could make a function that loops the induvidual ...


7

This book isn't specifically about data modeling, but I have found it particularly useful for working with spatial data in SQL Server. http://www.amazon.com/Beginning-Spatial-Server-Experts-Voice/dp/1430218290 There is also a newer book that will be more advanced and focused on SQL Server 2012, but I haven't looked at this myself yet. ...


6

flickr shapefiles are plain shp file (if I'm not mistaken) so they can be imported into SQL Server 2008 with few commercial applications like SAFE FME, Manifold, AutoCAD Map etc. But if you don't have such application available, you can try with this tool shp2sqlserver. I didn't try it but it should work. I use SQL Server 2008 Spatial Tools but for some ...


6

Manifold will directly read and write SQL Server spatial data. I assume you are using 2008, but if not, Manifold will also let you use SQL 2005 (Geometries are varbinary(MAX) not SQLGeometry / SQLGeography in that case). They have a free CLR add-in that provides spatial indexing for 2005. It supports multi-users, conflict resolution, etc. We use it ...


6

mapoholic, Generally speaking, there isn't a reason to do a spatial query without a spatial index unless you are dealing with really small tables. Still though you would use the ST_ which don't use an index but do have the && indexable short circuit box operators. the functions that start with _ST are not meant to be used by end users. The reason ...


6

Your comment adds more insight as to what you are trying to do. You could just store it as WKT (well known text) Use ArcObjects to get the geometry to WKB, then use something like Sharpmap to convert to WKT. /// <summary> /// Converts geometry into WKB /// </summary> /// <param name="geometry">The geometry.</param> ...


6

I would equate this to asking for a SQL script that imported an excel file to SQL Server. Even if it were possible, you would be better off if you did not use only SQL scripts to automate the deployment of information. Its like asking for a screwdriver to hammer in a nail. SQL Server doesn't understand things like shapefile format and excel spreadsheets ...


5

My answer is not about performance, but do be aware that you are limited to Simple Features, and a limited set of the Spatial SQL queries. Not that this is necessarily a bad thing, although I have quickly found my self wanting of some of the SQL queries available in say Postgres or Oracle. The simple features I actually like, keeping it simple lets you ...


5

Uses Multi-grid indexing rather than R-Tree as PostGIS and Oracle. Not performance related but maybe important: Does not support coordinate transformations. There is a slight difference in SQL syntax. Example: SELECT * FROM table1 WHERE the_geom.STIntersects(geometry::STGeomFromText('POINT(100 100)',0)); There are probably some more but currently i ...


5

Your open-source (free) alternatives are a bit limited, you might be able to put something together with GeoServer (http://docs.geoserver.org/stable/en/user/data/index.html) as a viewer at least, if a web app is your intent. However many commercial GIS environments support SQL Server; a list of 'spatial partners' can be found here ...


5

No. The closest you're going to get is with personal or workgroup SDE. Those editions let you create databases from ArcCatalog but you still need to run the post-install initially to set up a SQL Server Express instance. If you're using enterprise, you're stuck with the post install (or the command line tools :)).


5

I have a web service that uses a couple of SDE featureclasses (Geometry data type, not geography) and does basically what you are wanting to do. The web service is used by a two different websites (1 ESRI silverlight, and 1 non-mapping ASP web application). In my case, the GIS data used by the web service is not versioned, so it's straightforward. The ...


5

I guess it works the same as PostGIS. If you are working in geometry type with geometry functions, the function just calculate with the unit the map has. In your case it seems to be lon lat degrees. Then your distance will not make much sense because the lat and lon degrees is of different length except on the equator. So, what you have to do is transform ...


5

Fusion Table basic example Spatial Query set in the code: layer.setQuery("SELECT Country FROM 188044 WHERE ST_INTERSECTS(Country, RECTANGLE(LATLNG(35.77, -12.57), LATLNG(66.6, 37.3)))"); Source: http://homepage.ntlworld.com/keir.clarke/web/fusion2.htm from: http://googlemapsmania.blogspot.com/2010/11/spatial-queries-added-to-fusion-tables.html


5

Try running the sp_help_spatial_geography_index stored procedure to get details on how your spatial index is being used. You should be able to use something like: declare @ms_at geography = 'POINT (-95.66 30.04)' set @ms_at = @ms_at.STBuffer(1000).STAsText() exec sp_help_spatial_geography_index 'lidar', 'SPATIAL_lidar', 0, @ms_at; Post the results in ...


5

I think this is implied, but I would NOT use a spatial index for a query when I had a non-spatial index that I could use instead. For example, I have 2,113,450 points that span the United States loaded into a table. If I wanted to pull all of the points that were within the state of Alaska, I could either do a spatial query that used the GIST index on the ...


5

@Hairy, in my experience, adding a SQL spatial column type has allowed me to move a lot of my spatial operations (distance, buffer) into stored procedures which is really handy. @Michael, ArcGIS toolbox has a "Copy Features" tool to push data into a sde geodatabase, and if you specify a Configuration Keyword of "Geometry" or "Geography" a sql spatial column ...


5

Bill Huber gave the right answer in the comments. I delayed the answer by running the NGS inverse tool incorrectly. It looks like confusion between latitude and longitude order. I did put the coordinates in the wrong order when I used the NGS inverse tool. Stupid of me! If I enter values correctly, the geodesic distance is 256414.3059 m. If I enter the ...



Only top voted, non community-wiki answers of a minimum length are eligible