New answers tagged

1

You may be getting this crash from one of the 3 reasons below: 1: SRID not set on Geometry Column. To check the SRID, I use the following SQL code SELECT *, GeometryColumn.STSrid FROM [DataBaseName].[dbo].[TableName] 2: Invalid Geometries in the Tables. To check the Invalid shapes, I use the following SQL SELECT * FROM [DataBaseName].[dbo].[TableName]...


1

SQL Server Spatial Tools is a CLR assembly that you can add to your database to assist with a number of operations that didn't come built in with the original release of SQL Server spatial objects. It has a set of functions to do similar operations as those found in Oracles SDO_CS. There is a projection example in the source code section, though it doesn't ...


0

I'm curious how you're joining tables in QGIS as DB Manager doesn't work with MSSQL tables... Otherwise, you can't edit data in joins nor can you edit data in views, so you might have to come up with a new workflow...


0

Here's an example of intersecting a geometry point with a WKT polygon: declare @tempPoly geometry; set @tempPoly = geometry::STGeomFromText('POLYGON ((3168400.501482 1706746.617880,3131160.918149 1690210.159546,3164754.668149 1673022.659546,3174650.501482 1688517.451213,3173869.251482 1700366.409546,3168400.501482 1706746.617880))', 2877); select * from ...


1

GeoServer (by default) doesn't make primary keys available to the renderer as they are usually just a simple integer or UUID so are of no real use for rendering. There are two solutions to your issue add a serial column to your table for use as the primary key. ask GeoServer to expose primary keys for you.


0

Microsoft's implementation of the spatial types and functions standard is a bit quirky -- The ST functions don't have an underscore between the ST and the function name (e.g. STWithin vice ST_Within) Rather than taking two operands, the operators are a function of the Geometry/Geography datatype (e.g., pnt.geom.STWithin(ply.geom) vice ST_Within(pnt.geom,...


1

I struggled with this too! I managed to solve the problem ogr2ogr -f MSSQLSpatial "MSSQL:server=Servername\SQL2012;database=DatabaseName;UID= username;PWD=password" C:\Pathto\shape.shp All you need to do is get rid of the [] and it should work...Hope this is still applicable to you.Just to show you I had the same issue here is a screensht of multiple ...


0

I had the same problem. Simply replace datetimestart >=CURRENT_DATE -1 with datetimestart >=GETDATE()-1


0

Try this method-may not be the best but could limit your search space to a few and thus help you speeding up the process. Create half mile buffers around every point Dissolve the resulting buffers -ensure no multipolygons Any point lying outside this polygon is now excluded from the search space Make sure you have built spatial indices and verify if this ...


0

Finally figured this one out. And apologies to @Vince - I see you mentioned this in a comment but I completely missed it until right now when I came to post this answer. The tool arcpy.ArcSDESQLExecute() is the arcpy equivalent of pyodbc, but unlike pyodbc, ArcSDESQLExecute will in fact read a .sde connection file (so I don't need to pass login details ...


1

To find the points distance (buffer) of another point there are two methods that could work: (note my data is stored in Colorado State Plane (feet) EPSG:2877 so I can use 5280 as the buffer distance) Use STIntersects: select points2.* from points1 as p1 , points2 as p2 where p2.shape.STIntersects(p1.shape.STBuffer(5280)) = 1 or STWithin: select ...


1

I've done it long-hand. Using mod on the eastings and northings Select Easting - [Easting] % 1000 As Easting, Northing - [Northing] % 1000 As Northing, Count(*) As CountOf Into rpt_Counts From SP_Records Group By Easting - [Easting] % 1000, Northing - [Northing] % 1000 This gets me the basic result I want I then do a bit more manipulation which I ...


-1

Try the Feature Manipulation Engine "FME" or Data Interop extension if you have .


0

To me - since SQL Server doesn't seem to have a problem - the probable reason is a geometry that QGIS doesn't handle. The most likely of these is a GeometryCollection So, is the incoming data in any sort of group, and is that group homogeneous (ie all the same geometry type)? If it does not form homogeneous groups of geometry then a GeometryCollection would ...


1

It's working: Go to "Database Connections" in the catalog window or ArcCatalog. Double click "Add Database Connection" a dialog box will open and authenticate as Database Administrator "sa" or using your windows authentication is the user part of sysadmin. Click OK, another dialog box will pop up asking you to provide a path to license file give it ...


0

You need to provide your geodatabase with a license to use in an enterprise database environment. Run the Create Enterprise Geodatabase tool and provide the license or authorization file in order to license your database. This tool needs to be run even if the database already exists - if it exists you just point it at the existing database and it will ...



Top 50 recent answers are included