Microsoft SQL Server is a relational database server product by Microsoft. Its primary query languages are T-SQL and ANSI SQL.

learn more… | top users | synonyms (1)

19
votes
8answers
6k views

What are the best databases for storing spatial data? Pros and Cons

A couple of days ago I installed the demo of spatialware 4.9 from MapInfo into my SQL Server 2005 install and loaded all the larger dataset into it. I was quite impressed with the performance vs the ...
6
votes
2answers
3k views

Is it possible to reproject spatial data using SQL Server?

SQL Server takes an SRID when creating spatial data, but is it possible to retrieve an object as a different spheroid? For example, let's say I have a bunch of spatial polygons using SRID 4258, but ...
3
votes
1answer
7k views

How to import shape file into SQL Server 2008 R2 using only SQL scripts?

I am trying to import some shape files into SQL Server 2008 R2. I found this useful tool called Shape2SQL however I am not sure how I can import shape file directly using only SQL scripts as this is ...
4
votes
1answer
3k views

Transforming geometry coordinates from SRID 4326 to SRID 3011

In SQLServer geometry field, I want to change the coordinates of geometry from one spatial reference system to another spatial reference system (from SRID 4326 to SRID 3011) by using ST_Transform. But ...
4
votes
1answer
1k views

STIntersects - Update field to give me count of points in polygon

I have a points layer (dbo.ptLayer) Around 1M points Spatial Geometry Type (dbo.ptLayer.geom) No spatial index just yet, but will create one once data gathering complete. I have a polygon layer ...
3
votes
2answers
2k views

ArcGIS Server Error: “Feature service requires a registered database”

I'm attempting to publish a feature service to ArcGIS server. I'm running SQL Server Express and ArcSDE. When I try to publish the service I get the error "00090: Feature service requires a registered ...
5
votes
2answers
824 views

Autonumbering fields in versioned ArcSDE Geodatabase?

I want to have a field with autonumbering in ArcGIS. I have a versioned ArcSDE for SQL Server geodatabase. Thus, using the identity seed attribute in the SQL Server is not an option. Is it not ...
1
vote
1answer
110 views

Routing in MS SQL 2012

I would like to perform routing in MS SQL 2012 similar to pgRouting. In pgRouting, I'd do the following steps to create a routable network: Create a database routing with template template_routing ...
12
votes
5answers
5k views

Use arcgis with SQL Server 2008 as a backend

I'm wondering how best to use arcgis] and sql 2008 together. At the moment we run manual imports and exports between sql 2008 and arcgis 10 shape files. With sql 2008 having a geography data type I ...
6
votes
3answers
2k views

When to store geometries using SQL-server geometry datatypes or ArcSDE?

With the release of SQL Server 2008 Microsoft added geometry data types. So geometries can now in an ESRI enviroment be either be stored using SQL-Server datatypes or ArcSDE datatypes. A colleague ...
5
votes
2answers
4k views

Find closest lat long to an input lat long (SQL Server 2008)

I have a point cloud in my database (SQL Server 2008 spatial). That is about 6 million records. There are 3 columns: id, value, geom. What is the optimal way of getting the 'value' at input lat long?? ...
2
votes
3answers
2k views

Trigger on SQL Server 2008 ArcSDE 10 and ArcGIS Server 10

I need to build a sql server db trigger to update a date field with the current date when a record is inserted or updated, I think. I will be using the date field as a way to recognize ...
13
votes
2answers
2k views

How can I fix my complex Polygons so they show correctly in Google Maps?

Problem: I'm trying to find a way to fix some broken polygon shapes and I'm not sure how I can do this. Details: I've got a number of polygons which I basically imported from TIGERLINES a while ...
3
votes
4answers
131 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 ...
3
votes
3answers
3k views

STDistance Unit in SQL Server 2008

I've got a SPROC in SQL Server 2008 where I'm trying to calculate the distance between a point and a polygon, and I'm getting unexpected results. I am passing a parameter (@Radius) in miles to the ...
2
votes
2answers
1k views

Shapefile to MSSQL with ogr2ogr fails to make connection

I am using ogr2ogr from OSGeo4W on my Windows 7 box to import a shapefile into a SQL Server database on one of my servers. I was able to successfully complete the conversion using shp2sqlserver, but I ...
0
votes
1answer
174 views

Do any of the SQL Server 2008 R2 SP 2 cumulative updates contain the MAXDOP spatial index fix?

I am troubleshooting ArcGIS 10.1 performance issues with SQL Server 2008 R2 SP 2 (10.50.4000) and the issue appears to be this MAXDOP issue: ...
7
votes
0answers
66 views

How can I automatically split a spatial layer to a grid [duplicate]

Possible Duplicate: Divide vector in equal smaller parts in QGIS or similar I am a software engineer and the company I work for has a project that needs some spatial data manipulation in ...
5
votes
1answer
636 views

QGIS and SQL Server Spatial Tables Performance

I'm trying to get a SQL Server 2008 R2 spatial database up and running to streamline the production of maps using QGIS. Currently I just have a handful of spatial tables (a postcode level point table ...
5
votes
1answer
222 views

How to create polygons in ArcMap 10.0 using lat/long data from SQL Server 2008 database?

Forgive me if this is very basic, as I'm new to GIS work (though I've been a programmer for 10 years) and so I'm not really sure how to approach this, but here goes... Can I take a table with ...
4
votes
2answers
682 views

How to preserve non-ASCII characters in ogr2ogr import?

I want to import a list of international place names and their locations into a SQL Server database using ogr2ogr. The source data is a CSV file encoded in UTF-8. I've prepared a five-record sample ...
4
votes
1answer
523 views

Is there a way to get centroid of geographic object in MSSQL?

I have a table of OSM geographic roads in MSSQL 2012. I want to create a new column with the centroid of each road (So I can set center on OpenLayers map for each road). How can I do it ?
4
votes
2answers
714 views

How can we use SQL to update feature class attributes in a versioned geodatabase in ArcGIS Workgroup

ArcGIS Workgroup Edition 9.3.1, MS SQL 2005 Express I have some attribute data that I want to periodically update with information from another RDBMS using SQL UPDATE commands. The data is ...
4
votes
7answers
934 views

Any Good Map Rendering Engines for SqlGeometry/SqlGeography

Can anyone suggest good map rendering engines for MS SQL Server Spatial types (SqlGeometry/SqlGeography)? By rendering, I mean plot the geometries to a common image format such as png or jpeg with ...
3
votes
1answer
167 views

Load and display a layer using PYQGIS

I'm having a go at using pyqgis from within the QGIS python console to load a layer from SQL Server and display it. I feel like I'm part way there but I'm having a real issue getting the layer to ...
3
votes
1answer
679 views

add new SRID to sql server

Is it possible to add a new SRID to sql server 2012? I've tried insert into sys.spatial_reference_systems values (4938, 'GEOCCS["GDA94",DATUM["Geocentric Datum of Australia 1994",SPHEROID["GRS ...
3
votes
3answers
646 views

Merging edited data back into ArcSDE master geodatabase?

I need some suggestions/inspiration for a problem we have. The problem: We have an ArcSDE master GIS database. We will edit this data almost exclusively outside of ArcGIS and outside of ArcSDE. In ...
2
votes
3answers
5k views

How to import shapefiles into MS SQL 2008 and then view that data using QGIS?

I'm a QGIS users but not a database person and I need some help on the DB side. I'm currently in the need to import several shape files into MSSQL 2008 and I have no clue how to do that and my IT guy ...
2
votes
3answers
2k views

Transform Data with Microsoft Spatial SQL

Is there a way to transform geographic data in SQL Server 2008 R2? Specifically, I want to take Lat/Long data and convert it to a State Plane coordinate system.
1
vote
1answer
43 views

Connecting to SQL Server Geodatabase using ArcObject in C#

I am going to save a polygon that is created from points to remote geodatabase.I am new with arcobject and cant undrestand how it works..at this point I want to open a connection to database using ...
1
vote
1answer
483 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 ...
1
vote
0answers
480 views

Why can't QGIS connect to MS SQL Server?

All, Up until yesterday, QGIS connected to my SQL Server 2012 database no problem. However, yesterday I installed SQL Server Management Studio (SSMS), and the SQL Server Client tools, and now I get ...
1
vote
2answers
436 views

Why do I get wrong length using STLength on MultiLineString?

I have 2 MultiLineString representing the a route (first is driving there and the second is the return way) . MULTILINESTRING ((34.787315938035292 31.318235314177119, 34.788431415005249 ...
1
vote
2answers
456 views

Plotting large numbers of objects on a chart using R and WKT format

I am retrieving thousands of geometry lines in WKT format from a Microsoft SQL Server database. I would like to plot all of those lines in one map, but I am having some difficulty with the code. How ...
1
vote
1answer
317 views

How to convert SQL Server Rasters to ASCII Grid?

I have 25km by 25km squares of the world in a relational database. Each square has coordinates for the top left and lower right corner as latitudes and longitudes. Each square also has an index ilat ...
0
votes
1answer
76 views

Viewshed calculation using SQL

Can i calculate viewshed in MS-SQL server? Viewshed analysis is Raster operation. I have elevation value vector observation as point vectors. Are there any methods to calculate Viewshed (using ...
0
votes
0answers
203 views

What does OGR “driver not loaded” mean when connecting to SQL Server through QGIS?

All, Using QGIS 1.8, SQL Server 2012, and OGR 1.9.2 (also fails on our SQL Server 2008 sandbox machine) When creating a connection in QGIS I'm getting the following errors: Ubuntu 12.04 Driver ...
0
votes
3answers
731 views

How to load spatial data into ArcGIS Javascript API application from SQL Server 2008?

I have geometry data in SQL Server 2008 R2. How do I load that spatial data using the ArcGIS Javascript API?
0
votes
1answer
1k views

C# library for converting geom field of SQLServer into set of google latlng

Is there any C# library which can convert the geometry field into set of google latlngs? I have stored a shapefile into SQLserver table. From Sqlserver i want to read the geometry field data and want ...