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
2 votes
0 answers
18 views

How do I find the length of part of a line segment that crosses a polygon boundary?

I have a street centerline table and a borough boundary polygon table. I want to select any centerlines that cross borough boundaries and also return the how much of that centerline is crossing each ...
Kurt Cederholm's user avatar
0 votes
0 answers
19 views

Connecting QGIS through to "Acquire " SQL database

I have the connection working and have a list of tables but all are showing "no geometry" There are tables with xyz coordinates available but are still showing "no geometry" Is it ...
Hamish McLauchlan's user avatar
0 votes
1 answer
56 views

Register a view in ArcGIS returns error 999999

I have created a view in an enterprise geodatabase (SQL Server) using arcpy.management.CreateDatabaseView. It shows correctly in ArcMap, and now I want to register it properly. I have done this many ...
Berend's user avatar
  • 4,597
0 votes
0 answers
26 views

GeoDjango support for Microsoft SQL Server

From what I've been researching and testing, it seems SQL Server is not fully supported by GeoDjango. Is this correct? Ive been running into errors such as "'DatabaseOperations' object has no ...
Jorge Urena's user avatar
0 votes
0 answers
18 views

STConcaveHull with MS SQL Server

MS SQL Server supports the STConvexHull function but not the STConcaveHull function. https://learn.microsoft.com/en-us/sql/t-sql/spatial-geometry/stconvexhull-geometry-data-type?view=sql-server-ver16 ...
Hakan Tugay's user avatar
0 votes
0 answers
11 views

Making GeoServer use Windows ADP to access SQL database

I will start this by saying i'm completely out of my depths with this, but alas, I will try anyways. I'm trying to create a WMS of the spatial layers in our project for our tablets to use when we are ...
Mow's user avatar
  • 175
1 vote
0 answers
31 views

Connecting QGIS to SQL server -- not showing sde

I have problem with seeing/making connection to spatial data on SQL Server with QGIS while I can normally see it (on the same SQL Server) with ArcMap. I should use the same user and password for both ...
Mart's user avatar
  • 11
1 vote
0 answers
66 views

Create dynamic layer based on a query in ArcGIS Pro: "ERROR 000055: Cannot create a Query Table for this workspace" when using "Make Query Table"

I have connected the SQL database server myserver in ArcGIS Pro. It then appears as myserver.sde under Databases in the Catalog window. Points can be visualized in a map with the fields X and Y (EPSG:...
stonebe's user avatar
  • 445
0 votes
0 answers
81 views

Utilizing spatial index in SQL Server

I have a table Points with shape column for points of geography type, and a spatial index on the column to improve performance.. CREATE TABLE Points(id VARCHAR(10) PRIMARY KEY, shape geography); ...
Sam's user avatar
  • 11
0 votes
1 answer
71 views

Cluster nearby points into a single polygon - SQL Server

I have a table with column shape of type geography where each row represents a point. It's required to cluster nearby points (within a specified distance from each other) into clusters of type polygon ...
Sam's user avatar
  • 11
0 votes
1 answer
167 views

GeoServer 2.23 error when opening layer preview

I've made a fresh new installation of GeoServer v2.23.2 on a Windows Server 2019 machine, running on Java SE v11.0.20+9-LTS-256. Everything seems to work, except for the layer preview... Whenever I ...
Cheshire Cat's user avatar
0 votes
1 answer
77 views

Does MS SQL server actually support spatial joins?

I have tried these ways to run a spatial join select * from a join b on GEOMETRY::STWITHIN(a.geom, b.geom) = 1 select * from a join b on a.geom.STWITHIN(b.geom) = 1 Both return the error:...
user55570's user avatar
  • 156
0 votes
0 answers
45 views

Unable to load layer default style from MSSQL database

I have a point layer in MSSQL database that has a relation with a polygon layer that is also stored in the same database. Both layers have default styles stored in layer_styles table in the same ...
Ivan Marjanović's user avatar
1 vote
1 answer
110 views

Unable to load data from a shapefile to SQL Server 2019 [closed]

Windows 10; GDAL 3.3.0; QGIS 3.2; Sql Server 2019; ODBC Driver 17 for SQL Server When I try to load my shapefiles into my SQL Server no rows are loaded, only the table structure for each shapefile. I'...
FatsGordon's user avatar
1 vote
0 answers
27 views

Join all results from a one to many join in ArcGIS Pro

I want to join all possible results (up to 5 counties intersect ZIP codes) from ZIP_County_Intersect to be populated as the null County fields in ZIP_County_Dissolve. These results are coming from ...
rachel.passer's user avatar
0 votes
0 answers
11 views

Importing shapefile from ArcGIS to SQL Server database without using deprecated geodatabase [duplicate]

I am having issues with importing the shapefile in ArcGIS Pro into the SQL Server database. It shows an error output and an empty table when it is imported. The only time I see this is working is when ...
zenmo's user avatar
  • 1
0 votes
0 answers
13 views

QGIS: Creating duplicate database merges all points, geometry remains separate but trying to select one selects all

The duplicate database was created using various methods (to debug this issue), FME writing a new database based on the old database as input, MSSQL Management Studio, SQL, as well as putting the ...
Tobias Holms's user avatar
0 votes
0 answers
25 views

SQL server zoom to extent for geography

I am working with spatial objects in SQL server 2016/2019. If I select a geometry, SQL server gives me a nice spatial view that shows the geometry nice and big in the screen. But if I do the same with ...
user55570's user avatar
  • 156
2 votes
2 answers
176 views

Getting SQL that defines Query Feature Class using ArcPy with ArcGIS Pro

A map in my ArcGIS Pro 3.0.3 project has a layer with a Query Feature Class as its source. I can see the SQL that defines the Query Feature Class by looking at its Layer Properties. That SQL is ...
PolyGeo's user avatar
  • 64.9k
0 votes
0 answers
23 views

Trying to run TableToTable tool to export view from SQL server database to enterprise SDE in standalone Python script

I’m trying to export a view from an SDE connection to a SQL server database to new table in an enterprise SDE database. Both are saved as SDE connection files on a file share. I’m getting ERROR ...
TylerArmstrong's user avatar
0 votes
0 answers
429 views

Connecting to MSSQL Server - QGIS 3.28 & Ubuntu 23.04

I've been using QGIS + Ubuntu for some time now, great combination. Last week I've updated from Ubuntu 22.04 to Ubuntu 22.10 and subsequently to Ubuntu 23.04. During this upgrade the system has ...
Leandro Sastre's user avatar
1 vote
0 answers
37 views

Clipping line features to polygon in SQL Server

I am trying to figure out how to clip a rivers layer to a polygon layer in a view. Below is the code that I tried but I receive an error (i.e. SQL Error [4145] [S0001]: An expression of non-boolean ...
Nicole's user avatar
  • 19
0 votes
1 answer
22 views

Error in Python script while executing through enterprise geodatabase (working fine FGDB) [closed]

I have the following script: workspace = r"D:\\Python\\Cend.gdb" MEGIS_ELECTRIC_CircuitSource = "CircuitSource" Fc = "ElectricDistribution\\...
Rpandia31's user avatar
  • 141
1 vote
0 answers
225 views

How to publish or replace the data to the feature layer hosted?

A little background: My teammate has created a hosted feature layer. I access the data of hosted feature layer using ArcGIS API for Python and pull the data. The hosted feature layer he created doesn'...
SC_Python's user avatar
0 votes
0 answers
31 views

SQL Server ArcSDE spatial index behavior

Does anyone know if there is harm in bypassing the ESRI GUIs and simply rebuilding the spatial index on a feature class natively via SQL Server? When attempting to do so via the GUIs, there is a ...
Random Geo guy's user avatar
0 votes
0 answers
33 views

Issue with Query Layer and view ArcGIS 10.7

I've encountered an issue regarding working with views in SQL Server Enterprise. There is a Left Outer Joind view created by joining two tables (Spatial) and using fields from only the Left side with ...
Ali's user avatar
  • 1
0 votes
0 answers
23 views

Import Texas House map PlanH414 into SQL server using ArcGIS online

I would like to know if there is a way to import a specific shapefile into SQL Server 2016. The shapefile is downloadable from https://data.capitol.texas.gov/dataset/planh414. We have access to ArcGIS ...
benik9's user avatar
  • 101
1 vote
0 answers
44 views

QGIS - Connect to DB using Task Manager (problem)

As I have a lot of layers, I am writing a plugin that will import layers through TaskManager. Script imports layers successfully into the project with some minor problems. When layers are loaded I can ...
MatijaG's user avatar
  • 11
1 vote
1 answer
205 views

Use ogr2ogr/ogrinfo to connect to MSSQL on Ubuntu Server

OS: Ubuntu Server 20.04; Software: GDAL/QGIS, ogr2ogr/ogrinfo My goal is to use ogr to pull data from MSSQL as part of a longer process that I'm working on. First step is to test out the connection ...
MidPiedmont's user avatar
1 vote
0 answers
45 views

Setup a QGIS model to run on an Ubuntu server automatically

I made a QGIS model tool that pulls a copy of two datasets from a MSSQL db and runs several sets of geoprocessing tasks and outputs a single resulting dataset to a pgSQL db. This process runs ...
MidPiedmont's user avatar
1 vote
0 answers
111 views

Is there a faster approach to change a data type on a feature class field in ArcGIS Pro 2.9.5?

I've followed the "Calculate Field Tool" steps from this article https://support.esri.com/en/technical-article/000023089 to change the data type on a field but it takes so long to copy the ...
Allex Santana's user avatar
0 votes
1 answer
54 views

Configuring the database for a new GeoNetwork Installaion

I have some questions after reading the documentation for "Configuring the database" for version 4.0.x GeoNetwork. The documentation states: "The database dialect is configured in /WEB-...
Philip Whitten's user avatar
0 votes
1 answer
26 views

Force GeoServer to make use of carriage return from SQL Server

I'm completely new to GeoServer. In desktop GIS I can use CHAR(13) in views on SQL Server to make GIS interpret a carriage return, when I visualize a label. Is this possible using GeoServer? As I ...
Joachim Mahrt's user avatar
0 votes
0 answers
37 views

Visualise results from STUnion in SQL-Server 2008 R2

I have an SQL table which contains the buffers polygons of points. These buffers should now be aggregated any displayed as a single Polygon/Multipolygon. With the following command I think I can do a ...
Robert Buckley's user avatar
1 vote
0 answers
141 views

Issues saving and retrieving data from MS SQL Server with QGIS

Wondering if anyone has issues with geometry not loading into QGIS when sourced from MS SQL Server for following specific case. Software specifics: MS SQL Server spatial :15.0.2000.5 Standard Edition (...
karunakar's user avatar
3 votes
0 answers
147 views

QGIS has started putting all features into one row in Attribute Table

This is a bit of an odd one. We host our data in an Microsoft SQL Server database, and until a couple of weeks ago this was working fine. We've got about 17000 rows in it, all with a geometry. When I ...
user25730's user avatar
  • 864
-2 votes
1 answer
151 views

Float data type data shows null in attribute table [duplicate]

When I tried to open table from MS SQL Server, float data type data shows null in the attribute table. It only shows only one record.
Saidatta's user avatar
0 votes
0 answers
85 views

Convert PostGIS to MS SQL inside web app using ogr2ogr.py and Docker

I am trying to convert a PostGIS database to a SQL Server database inside a running Flask app. There are three docker containers running: web: flask app postgis: PostGIS database mssql: MSSQL ...
linus's user avatar
  • 101
1 vote
0 answers
121 views

Cannot Append date field - getting NULL values

I'm working on a standalone script that appends data from a SQL Server table onto an SDE db table. When working directly in ArcGIS Pro - the append works fine, but using a standalone script - dates ...
Fire GIS Guy's user avatar
2 votes
1 answer
431 views

ArcGIS Pro unable to add SQL database object when new fields had been added

About 90% of the layers on my maps are query layers from SQL Server database connection. My typical workflow is to drag and drop the spatial objects from the Catalog pane into the map frame and then ...
aakims's user avatar
  • 21
0 votes
1 answer
477 views

SQL Server: Coordinate conversion from NZTM to WGS84

I got a table that has shape value in one of the columns. I am converting shape value into geo_json formate and calculating centroid value and saving in two columns. The coordinate system of shape ...
user2293224's user avatar
2 votes
1 answer
306 views

Loading MS SQL table into QGIS using PyQGIS

I'm hoping to have some pieces of code on hand that link QGIS to a MS SQL database. All the tables in the database lack geometry, but have X Y Z coordinates. The database is password protected but I ...
Dan Coutts's user avatar
2 votes
1 answer
203 views

Publish UTM from geoserver using mssql geometry

I have my world lat, lon coordinates insert in an ms sql geometry column like this: geometry::Point(56.120417, 10.159337, 0); I have an ms sql store in geoserver and a layer that exposes these ...
noontz's user avatar
  • 123
0 votes
0 answers
165 views

Enterprise geodatabase maintenance Esri vs. SQL Server (rebuild index and update statistics)

I'm looking at two geodatabase maintenance practices and seeing if they need to be updated/refined, and I'm noticing that these can be accomplished via ESRI tools or directly via SQL / within SQL ...
Peter Bishop's user avatar
0 votes
1 answer
55 views

Creating DbGeometry instances that honor SRID

I maintain an ArcMap Add-in tasked with allowing people to see & edit some native SQL shapes in ArcMap, which of course require working with SqlGeometry and DbGeometry types. Converting between ...
Dan Narsavage's user avatar
0 votes
1 answer
536 views

Microsoft SQL Server "There is already an object named 'geometry_columns' in the database" error

I have trouble adding new layers to the existing MS SQL Server database. Whenever I try to add any type of spatial layer I encounter an error, as follows: [Microsoft][ODBC SQL Server Driver][SQL ...
Maciej_Szypulski's user avatar
2 votes
0 answers
225 views

Cannot add geometry layer to QGIS although geometry column is recognized

The geometry column POINT in the View (not Table) View_MyGeometry is generated in the SQL database GeoData with Microsoft SQL Server Management Studio. QGIS recognizes this column as a geometry column ...
stonebe's user avatar
  • 445
0 votes
0 answers
147 views

GDAL Appending Shapefile to SQL Error: Ogr2ogr ERROR 1: MSSQL extents query returned a NULL value

I have an OGR2OGR script to append a shapefile to an existing SQL table, but I get the error 'Ogr2ogr ERROR 1: MSSQL extents query returned a NULL value'. I have seen discussions with various ...
Josh's user avatar
  • 193
0 votes
0 answers
38 views

High margin of error for circle point calculation

Created a circle of points, 50m, 100m, 150m and 200m from a central lat/lng (51.500421, -0.124754) using the sql functions below (one for the lat the other lng). My concern is with the accuracy of the ...
CGarden's user avatar
  • 65
1 vote
0 answers
110 views

Create grid around lat/lng with same spacing on the diagonal points using SQL Server

As an example I have a lat/lng circled in red below. I want to create a grid of points using SQL Server at 50m intervals up to 200m from the centre point. But those points that are on a diagonal are ...
CGarden's user avatar
  • 65

1
2 3 4 5
19