Tag Info

New answers tagged

0

As Russell mentioned in the Comments to the Question above, I had the coordinates wrong: My sql for inserts was fine but the published ArcGIS Service was set at 4326 projections while the data was in Web Mercator 1002100 format. So I created a new .MXD file, exported its data to the SQL Server, then Published the .MXD as a new Service and everything works as ...


0

Provided that your data would not allow new inserts, having a computed column in SQL Server would be sufficient. However, since you are dealing with new inserts, I'd go for a trigger. CREATE TRIGGER [XY_calc] ON dbo.Signspoints AFTER INSERT AS UPDATE dbo.SIGNSPOINTS SET x_sql = Shape.STX,y_sql = Shape.STY WHERE x_sql is null or y_sql is null Execute this ...


0

MapSurfer.NET is an advanced cartographic framework for producing beautiful and readable maps. It supports both Microsoft SQL Server 2008 and 2012.


2

Here is a T-SQL way to dynamically add a set of users to a database and grant them permissions NOTE I have no way of testing this at the moment, so there may be syntax errors and test it in an environment where it can't cause harm. USE TestDatabase; --Make sure you have the right database DECLARE @sql VARCHAR(MAX) = ''; SELECT @sql = @sql + 'CREATE USER ...


2

In SQL Server 2008 there is no reprojection from one coordinate system to another, which is probably what you were expecting to happen automatically, when you put 27700 inside the STGeomFromText function. EPSG:27700 is the British National Grid, which is a projected coordinate system, ie, it is in meters and on a Cartesian plane. The geography datatype, ...


0

If you make your point as a Geometry instead of a Geography it will work. Geography objects must be on round earth and the UK is flat :-)


2

If your data is stored in your SQL Server database as native spatial data, you can certainly do this. Assuming your territories (T) and sub-territories (ST) have attributes for their name and/or type, my suggestion would be along the lines of: Create a view (a dynamic table in your database) that joins your two polygons together using a join, where the ...


2

Further to Russell's Answer It's unfortunate that you have you locations stored in the wrong data type. The easiest way to get an accurate distance between your is to cast the geometries as geographies. You will need to confirm the the Lat is stored in the Y and the Long is stored in the X of the geometry, otherwise you will most likely end up with ...


2

It's kludgy, but you could query point geometries into geography SELECT Geography::STPointFromText('POINT(' + CAST(geomcol.STX AS Varchar(20)) + ' ' + CAST(geomcol.STY AS Varchar(20)) + ')', 4326).STDistance(...)


0

My solution for this is to disable editor tracking and enable it. I am using a Python script to automate my post processing of the data, so disable editor tracking will be at the beginning of the script while enable editor tracking will be at the end of the script.



Top 50 recent answers are included