Microsoft SQL spatial database

learn more… | top users | synonyms (2)

1
vote
2answers
25 views

How to use STUnion with GroupBy

I'm using SQL Server 2008 R2 to store Geometry data types. I have a bunch of lines as individual features, that share common names ('NAME' field). I would like to create a view that Groups By 'NAME' ...
0
votes
1answer
22 views

SRID, Shape2SQL and SQL Server 2008r2 query

I'm using Shape2SQL to load the Ordinance Survey's Meridian 2 map into SQL Server 2008r2 (which is working very smoothly and painlessly). According to this page ...
5
votes
2answers
80 views

Optimizing Geometry.STIntersect Query

I am attempting to move simple Geoprocessing routines from ESRI based processes to SQL Server. My assumption is that it will be far more efficient. For my initial test I am working on an intersection ...
0
votes
0answers
12 views

send attribute from 75,000 object polygon to 20Mil point database

I have sql server 2008 r2. I have two tables: PropertyParameters and REF_GEOID. Property Parameters has four columns: PropertyID, ParcelID, Lat, Long. REF_GEOID has two: GEOID and GEOM. GEOM is a ...
0
votes
0answers
43 views

How to speed up SQL spatial query (spatial index error)

I am trying to split polylines by points which have a small buffer around them. Currently I have over 370,000 lines and 320,000 nodes and the query is running really slowly (I've left it for 3 days ...
4
votes
4answers
123 views

How do you generate WKT from a graphic drawn on a map?

All, In order to do some quick analysis using SQL spatial, I'd like to generate spatial objects using the STGeomFromText / ST_GeomFromText function. With point data, I can do this by geocoding an ...
1
vote
3answers
100 views

ST spatial queries to select multi-level location

I'm trying to write a query in SQL Server using 1 set of points and 2 sets of polygons. The polygons overlap, and I only want to select the points that fall inside of 1 polygon but not the other. I ...
1
vote
0answers
74 views

Creating Irregular ellipses using SQL Spatial 2012 Geometry

I have stumbled across a problem in SQL Server 2012 - whereby I need to create different shape ellipses from the following data points: centre_x | centre_y | max_x | max_y | min_x | min_y I have ...
1
vote
1answer
797 views

accurately find the bounding box of geography polygons

Im displaying polygons on a map and have had issues with the spatial index where the index performs well only for certain data sets (large areas with low density / high density small map areas). I've ...
0
votes
1answer
149 views

How to union polygons and add attribute values of combined output features

I have a layer containing 10 polygons all overlapping at various locations. Each polygon has a value of '1' in a column called "value" How do I Union the polygons (rows) together such that the ...
3
votes
1answer
98 views

How to migrate spatial tables from MSSQL to Postgis

I'd like to migrate my spatial datas from MSSQL to Postgis. Originaly the data stored with SDE under MSSQL. Then I migrated with an ArcGis tool. That create us spatial data column with WKB data I've ...
4
votes
2answers
178 views

Storing SRID:4326 data as Geometry or Geography?

I used OGR2OGR to import SRID 4326 point data into MSSQL Server. Didn't realize that it defaults to creating a geometry column instead of detecting the data as 4326 and creating a geography column. ...
0
votes
1answer
465 views

SQL Geometry Query similar to Select by Centroid

Does anyone know if it's possible to query SQL geometry by something like 'centroid of polygon'...similar to ArcMap's select by location? I'm using SQL Server 2008 R2 as the DBMS. I have two polygon ...
3
votes
4answers
225 views

How to assign geometry to records in a table that contain an ID of a geometry point?

We are looking to map out 'incidents' at schools, but the incident table, which contains a few thousand records, only has a school number (plus the incident data). The table format is an Excel ...
1
vote
3answers
163 views

How to count points once with overlappying polygons?

All, We're using parcel data (polygon) to count student locations (point) based on parcel type. We're doing this using SQL and the ST_Intersects function. It works great, except the City and County ...
1
vote
1answer
154 views

MSSQL server 2008 dissolve sql query

I have a set of spatial objects in a MSSQL server 2008 R2 trying to dissolve adjoining objects where one of the attributes are equal. The table below is somewhat representative to my original table: ...
1
vote
1answer
180 views

Delete duplicate spatial point/points in mssql from a perticular location

I am working with a Spatial data which has a street intersection points.... I get the intersection points from spatial query on street/roads datain MMSQL . but in my case some streets/roads are multi ...
1
vote
0answers
223 views

How to add a MSSQL spatial layer using Python?

I'm having difficulty adding a MSSQL spatial data layer using Python. The database is password protected, and I can add the layer without any problems using the built in feature, but I can't make it ...
1
vote
2answers
182 views

Issues with Selection and Viewing of Attribute Table using QGIS and SQL Server Express 2008 R2

I am having issues with Selection using QGIS 2.0.1. Dufour. When I select one point, all of the points get highlighted. Attribute Table dialog shows Errors for all of the attributes. It indicates that ...
0
votes
1answer
53 views

Can distance be calculated to a destination feature based on an attribute in the source?

All, Is it possible to specify which destination point to calculate distance to based on an attribute in the source? STDistance will give me the distance each student (point) is to their closest ...
2
votes
1answer
316 views

How can I create geometry in SQL2012 with custom SRID?

I want to create geometry using EPSG 2039 in mssql 2012. This srid doesn't exist in sys.spatial_reference_systems any idea how I can do it ?
0
votes
1answer
246 views

What is required to get OGR to work with SQL Server?

All, I've been having heaps of trouble getting OGR to connect to our SQL Server development environment. (read about it here and here) SQL Versions: 2008, 2012 OS's: Windows 7, Ubuntu 12.04 My ...
2
votes
0answers
57 views

What is the MS SQL Spatial syntax for counting points within polygons? [duplicate]

All, What I'm trying to do is this: Count points within polygons There are thousands of points and maybe 2 dozen polygons Get a list back of the 2 dozen polygons by name and the count of points ...
2
votes
1answer
958 views

Why does ogr2ogr SHP import error out trying to create a database?

All, Can anyone tell me what the error is with OGR2OGR when trying to import a .SHP into MSSQLSPATIAL? ERROR 1: MSSQL Spatial driver doesn't currently support database creation. Please create ...
5
votes
2answers
968 views

Change polygon “handedness” for SQL 2008

I have a few hundred shapes (polygons and multipolygons) each consisting of tens of thousands of points that I am trying to get into SQL 2008. Unfortunately, the shapes I have tried to import are ...
3
votes
2answers
417 views

WMS layers don't draw in QGIS or ArcMap but do in OpenLayers

WMS Map was published by myself in AutoDesk Infrastructure Map Server 2013. I can connect and load detials (properties / metadata) in QGIS Browser, ArcCatelog. I can load the wms into QGIS desktop and ...
2
votes
0answers
154 views

How to do Spatial Tools Projections between different projection types

I am working with the SQL Spatial Tools from http://sqlspatialtools.codeplex.com/ And a variety of data sets, primarily from LINZ and Google. These involve working with projections for 4326 (WGS84?) ...
3
votes
3answers
1k views

SQL Spatial view using a Query Layer in ArcMap 10 is SLOW

We have a number of SQL Spatial views each made up of approximately 10 tables (so relatively complex views) and each including a table with a SQL Geometry column. A view could return up to 300-400 ...
8
votes
3answers
16k views

Create a geography/geometry column from x and y fields - SQL Server 2008

Hy guys, I'm new in SQL Server 2008 and I hope you will understand my question/need. Thus, I have a table which contains 3 fields (Name, Lat and Long) in my data base (spatial). I want to create a ...
3
votes
2answers
634 views

ArcGIS Server and SQL Spatial. Examples?

In-house we have an ArcGIS Server license that I am somewhat familiar with, and a license for SQL Server. I'm looking for some examples of existing web maps that use ArcGIS Server for the display of ...