Microsoft SQL spatial database

learn more… | top users | synonyms (2)

1
vote
0answers
15 views

Difference between adding spatial layer from MSSQL through “browser” and “add MSSQL table”

So I am trying to pinpoint the difference of adding layers from MSSQL Database that contains spatial layers like geography and geometry. I have noticed that when adding from the browser it retains it ...
1
vote
1answer
27 views

Does SQL Server Data Need to be Spatial

In reference to my previous question. I am looking for the benefits of telling SQL Server your data is spatial. For instance, I have a duplicate of that table generated by the Shape2SQL tool (see ...
0
votes
1answer
35 views

SQL Server Spatial Querying

I am looking for ways to learn querying for SQL Server Spatial (2008/2012). I have a table created from Shape2SQL and have been trying to run a simple intersection query to get results from that ...
0
votes
1answer
48 views

SQL Server geometry vs. geography in Esri map service

We have a SQL Server 2008R2 database where point coordinates are stored as decimal degrees. I want to create an Esri map service which shows those points. As the point data is dynamic I decided to ...
2
votes
1answer
46 views

convert ordnance survey easting and northing data to WGS84 latitude longitude values

The C# code published here is not very accurate as also mentioned by tanoshimi. I think this has to do with the lack of 'approximate Helmurt transformation'. Just curious is anyone aware of some ...
0
votes
0answers
19 views

ArcGIS Data Interopabality Extension and Exporting from Mapcom M4

I am exporting from Mapcom's M4 database into Geodatabase or Shapefile. I have the ArcGIS Data Interopability extension and I was able to connect and export the Lines, Points, polys, etc. When I ...
0
votes
0answers
39 views

SQL Spatial Tools package - linear referencing

The SQLSpatialTools package website seems to be temporarily down, so I cannot access the article on linear referencing tool posted there at the moment. Is it possible, by any other means, to obtain a ...
0
votes
1answer
25 views

Geog vs. Geom - not same results [duplicate]

I have these two SQL Server 2008 R2 queries: SELECT COUNT(*) FROM OIS_NOA_Buffers WHERE geog.STIntersects(geography::Point(35.25934, -120.64432, 4326))=1; SELECT COUNT(*) FROM OIS_NOA_Buffers WHERE ...
1
vote
3answers
101 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
104 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
210 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
13 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
72 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
171 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
124 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
99 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
1k 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
174 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
128 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
239 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
583 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
242 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
2answers
183 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
205 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
212 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
263 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
196 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
57 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
365 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
317 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 ...
3
votes
1answer
1k 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
1k 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
452 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
175 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 ...
11
votes
3answers
19k 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
665 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 ...