Questions tagged [sql-server]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
103 views

Extract intersecting polygon from multipolygon search

I'm using the latest SQL Server and trying to build a query where i can search a database of spatial data and find the intersecting polygon. The problem is that the spatial data can be of ...
0
votes
0answers
12 views

How do I set the type of geometry when creating a SQL table?

The table I am trying to recreate has these properties Data Type File Geodatabase Feature Class Feature Type Simple Geometry Type Polygon <<<< WHAT I WANT TO RECREATE My target ...
1
vote
0answers
41 views

How to calculate a line from a position and bearing in SQL Server 2012 (Spatial)

Currently I've a table filled with measurements from a certain point. All the rows contain a location in Lat/Lon, a bearing in degrees and some other data containing sensor updates etc. At this moment ...
1
vote
2answers
489 views

Database support in GE Smallworld?

What database engine can be used for GE Smallworld? I have poor information but I read about Smallword proprietary VMDS. Is it possible to use Oracle or SQL Server?
0
votes
1answer
14 views

Choose a specific geometry column of a Spatial View in a Microsoft database to plot feature points in ArcMap

I have created a Spatial View in a Microsoft SQL database (SQL Server Manamgement Studio v18.4), i.e. a View with spatial columns. This View contains the two following point geometry columns for two ...
0
votes
0answers
29 views

SQL query for adding MSSQL Layer

I want to add a mssql layer with a SQL query. It was no problem to do it for PostgreSQL but have somebody an idea of how it is working with the mssql database? uri = QgsDataSourceUri() uri....
0
votes
1answer
30 views

ArcGIS10.2 SDE relationship class referencing a deleted feature - how to clean up relationship class?

I am looking for a smart approach to cleaning up a relationship class, which consists of relationships that look at previously deleted objects. To illustrate, we have db.schema.SITE (spatial), db....
1
vote
1answer
361 views

Unable to load layers from MSSQL PyQGIS

I have a plugin that loads layers from SQL Server 2008. It has worked before but when I reset my PC, i wasn't able to backup my plugins. I am left with an older copy. Below is my python code to load ...
0
votes
1answer
45 views

Slow SDE Performance After Append - Geometric Network

I had an odd thing happen today, I do almost daily appends to our fiber network (fiber, splices, etc) and usually, it goes smoothly and with no complications. For some reason, I had an Append stall ...
3
votes
1answer
2k views

Should the QGIS “DB Manager” have Microsoft SQL Server as an option?

I was looking for interactive query options for SQL Server (similar to SQL Server Management Studio). The "DB Manager" works great for Postgres and I'm primarily using the Load as new layer as I build ...
2
votes
1answer
1k views

Transforming Lambert to WGS84 in SQL Server

Need to create a SQL view of calculated Lat/Lon values from an existing SQL view of County Coords. Loaded up SQL Server Spatial Tools and registerd CLR types. Lambert generated a resource error. -- ...
8
votes
1answer
297 views

“Driver not loaded Driver not loaded” when trying to connect to MSSQL database in QGIS 3.8 on MacOS

When trying to create a new MSSQL Connection, I get an error saying: Error opening connection: Driver not loaded Driver not loaded. I have tried both QGIS 3.8.0 and the newest pre-compiled QGIS 3.8.1 ...
0
votes
0answers
10 views

Using SHAPE field in a covering index for SQL Server

Can I use the SHAPE field in a feature class as one field in a covering index? In addition to SHAPE, we almost always see reads on COLUMN2. I cannot create an index like this (SHAPE, COLUMN2) in ...
0
votes
0answers
18 views

SQL Server to generate points on map for web

These are my components: SQL Server 2016 with R-in-database. smb-share on a subdirectory underneath root directory of an IIS with enough rights to let R-in-database write files. Tables in ...
1
vote
1answer
53 views

Measuring area covered by linestring

I have a trajectory given by GPS which I store as a ST_LineString() and I'd like to know the area covered by the line string. I know the "width" of the trajectory, but I'm not sure how to approach the ...
2
votes
1answer
1k views

Error QODBC driver not loaded when trying to connect to an MSSQL database from QGIS 3.4.3 (Ubuntu)

I have installed QGIS Desktop (latest one: 3.4.3 Madeira) along with the unixODBC-dev for SQL Server 2017 (following instructions here). I used sqlcmd from msql-tools and successfully connected to the ...
2
votes
1answer
92 views

Optimising Large Spatial Queries in SQL

I'm sure similar answers have been given elsewhere but no matter what I have tried I am unable to optimise this query. Details: TableA has 3.5mill records TableB Had 57000 records but I have ...
0
votes
1answer
41 views

Stop SQL Server selecting outside buffer

I am trying to select all the parks within 200m or a railway. I can easily create and visualise the 200m buffer. However when i try and find only the parks that intersect it i get all parks returned,...
0
votes
0answers
49 views

Copy tables from Server Database to a Geopackage with no geometry and with geometries using PyQGIS

I am making an application in PyQGIS that uses tables that are on an SQL server. I want to make a copy of all those tables in a local Geopackage, because I want to use my application in my laptop ...
0
votes
0answers
27 views

Generate Points from inside SQL Geography

I have a shapefile which has been loaded into MS SQL-Server. Mostly polygons, but some multi-polygons as well. For each record, I need to generate a list of say 50 points that are within the polygon. ...
0
votes
1answer
529 views

Identify EPSG in SQL Server

I have been trying to load a shapefile available at https://www.elections.on.ca/en/voting-in-ontario/electoral-district-shapefiles/open-use-data-product-licence-agreement/download-shapefiles.html to ...
0
votes
1answer
231 views

Adding ArcGIS Pro Query Layer?

I am attempting to add a query layer to ArcGIS Pro 2.1.2 via SQL Server. The table consists of Ticket_ID, Latitude, Longitude. The query layer works if I only add the top 1000 rows. However, when I ...
2
votes
1answer
29 views

How are Modifications and Deletions represented when looking at enterprise geodatabase delta (add, delete) tables?

I'm trying to understand how to make sure a delete is a proper delete and not a modification, and vice versa. I'm using ArcGIS 10.2 and Enterprise geodatabase on MS SQL Server. See below SQL: select ...
2
votes
2answers
6k views

Import shapefile in SQL Server (OGR2OGR)

I'm importing a shapefile into SQL Server '12 via the OGR2OGR tool and am getting a database connection error. I followed the example from this article. What I ran: ogr2ogr -overwrite -f ESRI ...
12
votes
2answers
27k 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?? ...
0
votes
1answer
43 views

Using Python, how to get SQL Server queried points in the map?

Since days I'm struggling with this problem, did a lot of searching - also in this forum - but did not find the answer I need. I have a layer 'Project' in QGIS that is connected to a spatial table in ...
2
votes
1answer
86 views

Using Python, how to select points within a certain radius of a certain point?

I have a spatial table in SQL Server with point features, and connected it to QGIS which neatly shows all points. Now I want to select points in this table (and show them in the map) within a certain ...
3
votes
2answers
278 views

Combining ST Buffer and Intersect with Where clause

I'm trying to create a buffer around a single point in a spatial entity and finding all the points from a different entity that fall within that buffer. I tried two approaches. The code below runs ...
3
votes
2answers
3k views

Understanding Differences in Area Calculations between SQL Server and QGIS

I'm trying to get accurate calculations of area from SQL Server. When I perform comparisons between it and QGIS, I'm finding that my numbers do not match. Here's what I'm doing in SQL Server and ...
2
votes
1answer
121 views

Converting ArcSDE point data from image to MSSQL geometry

I have a bunch of points in an SDE table which is currently stored in an MSSQL database. The full entry is below, while the data i'm trying to convert from binary to geometry is: ...
-2
votes
1answer
55 views

SQL Server how to create spatial index? ( spatial query )

I know how to do spatial query, Shape is my geometry type column. bbox is well know text format of a bounding box srid = 2229, you must specify this srid in where intersect clause ...
0
votes
1answer
40 views

GeoServer Microsoft SQLServer view not visible as WFS

I am running a GeoServer 2.16.2 that connects to a Microsoft SQL Server 2008 database using the SQL Server extension and the Microsoft JDBC Drivers. Java Version: AdoptOpenJDK: 1.8.0_242. I can ...
0
votes
1answer
530 views

MSSQL performance with Geography (point within polygon)

I have a query, below, that works - however its very slow, looping through roughly 24,000 points per second. This is a rather high end production DB server with MSSQL and SDE, and in other instances a ...
0
votes
1answer
140 views

Setting Up Cesium in wamp64

I wanted to clarify with all of you whether I am setting up Cesium correctly in wampserver using Windows 7 64 bit. The Reason on why I want use wampserver is because I want to access data from the sql ...
1
vote
2answers
160 views

Reducing coordinate decimal places in WKT using C#?

I have imported several shapefiles into a Microsoft SQL Server 2017 database When I use the STAsText() function on geography objects I get the following WKT: SELECT [Adm0GeoBoundaryID] ,[...
1
vote
1answer
106 views

How do I transfer data from a geopackage to MS SQL server

I am trying to upload a geopackage (created with ogr2ogr though I don't think that matters) to a MS SQL Server 2008 instance. I can't access the instance with ogrinfo all I can get is C:\>...
2
votes
1answer
57 views

Layers render very slowly when importing from sql [closed]

I am trying to get a handle on importing layers into qgis 2.6 using the "Add MSSQL Spatial Layer" option. I was able to import a layer successfully, but it seems to take a long time to render. Is ...
3
votes
1answer
3k views

MS SQL Server's STDistance output differs from Google Earth/Maps straight line distance

I am testing SQL Server STDistance function in the following way: DECLARE @g geography; DECLARE @h geography; SET @g = geography::STGeomFromText('POINT(53.553813 9.99158)', 4326); SET @h = geography:...
0
votes
1answer
27 views

Unable to connect to SQL Server tables with 10.5 ArcMap but it works with 10.7

I have a requirement where I need to connect to the SQL Server which I have created using ArcCatalog 10.7. I have a requirement where I need to now use 10.5 version. But when I attempt to connect to ...
1
vote
0answers
59 views

QGIS 3.10.3 failing to recognize EPSG:27700 on MS SQL data

If I load data that's held in EPSG:27700 (British National Grid) on a MSSQL Spatial database (v13.0.5622.0) into an instance of QGIS 3.10 (new project, defaulted to 27700), the CRS does not get ...
2
votes
1answer
90 views

Transfer real time data from SQL server to ESRI ArcGIS without using PI Integrator?

I am new to GIS. Right now I am working on my senior project in which I have to find the fault in transmission line and show its location on a map using ARCGIS 10.2. I have some readings of voltage ...
0
votes
0answers
14 views

Adjusting nodes in SQL

The intranet our company is using is combining shapes to form larger shapes. This is using code that is lost in the darkest realms of extremely bad practices, but for the most part it is okay. ...
1
vote
1answer
76 views

Using data from SQL Table instead of File Geodatabase Table

Does anyone know of a method to use the table from SQL Server table using OS Authentication, instead of a File Geodatabase Table in ArcPy? I have been using the below to reference the table ...
0
votes
0answers
82 views

Connecting to Microsoft SQL Server from QGIS

I can't connect my QGIS to SQL Server. This is my database: This is my connection configuration to QGIS If I press test connection it says "Driver not loaded". If i load database, there is ...
1
vote
1answer
163 views

Convert a SQL Server Geometry into PostGIS spatial data with Python and shapely

I'm trying to migrate spatial data from a SQL Server database to a PostGIS database with Python. I need this to be automated since its not just one table, but a lot tables in a lot of databases. I am ...
1
vote
2answers
290 views

Checking ArcSDE Compatibility with SQL Server

I am trying to find if I can use ESRI sde 10.5.1 with a SQL Server 2016 SP1. I am not able to find this information. What I've found so far: On the Microsoft SQL Server database requirements for ...
1
vote
1answer
25 views

Display map object from SQL database in MapInfo with read only access to the database

I can connect MapInfo to a SQL database using a select statement to display the contents of a table in the SQL database. However, the table is not mapable and I only have read access to the database ...
2
votes
0answers
2k views

Bulk Exporting Shapefiles Into Microsoft SQL Server using QGIS or PostGIS [closed]

I have found two popularly suggested ways to preform this task: ogr2ogr - just take a shapefile and use ogr2ogr to put a shapefile in to a sql server database. This would work for a few shapefiles ...
0
votes
1answer
1k views

Convert NZTM to Latitude/Longitude in SQL

I have NZTM coordinate data stored in SQL Server in a Geometry field. I'd like to convert these coordinates to Lat/Long so that it can be used with Bing maps in Excel (and a few other things). I ...
1
vote
0answers
44 views

Poor performance when adding layer indexed ArcGIS Service layer to AGOL

My data sits in enterprise geoddatabases on Windows Server 2012, SQL Server manager. I often add ArcGIS Server Web services to my AGOL maps and they perform really well. However, when I add a ...

1
2 3 4 5
17