georeference.org
Subscribe to this thread
Home - General / All posts - MS SQL Coordinate System problem - Projection Problem
Domagoj33 post(s)
#30-May-09 07:44

I have problem when i export data from Manifold to MS SQL Spatial database. I have using my coordinate system definition.

Picture1: Coordinate system which i am using

Picture2: Projection which i have when i try to export to MS SQL Spatial

Picture 3: Version of Manifold i am using

Right projection definition is:

<!-- .ElementLayer { margin:0px; padding:0px 0px 0px 30px; text-indent:-30px } .CompoundElementTitle { font-style:italic; cursor:hand } .SimpleElementTitle { font-style:italic } a:visited { color:blue } a:hover { color:red } --><!-- function OnElementTitleClick() { var eventElement = window.event.srcElement; var contentChildNodes = eventElement.parentNode.childNodes; if (contentChildNodes.length == 2 && contentChildNodes[0].tagName == "EM" && contentChildNodes[1].tagName == "DIV") { var contentStyle = window.event.srcElement.parentNode.lastChild.style; if (contentStyle != null) { if (contentStyle.display == "") { eventElement.innerText = "+" + eventElement.innerText.substring(1); contentStyle.display = "none"; } else { eventElement.innerText = "-" + eventElement.innerText.substring(1); contentStyle.display = ""; } } } } -->

- Spatial Reference Information:

- Horizontal Coordinate System Definition:

- Planar:

- Map Projection:

Map Projection Name: Transverse Mercator

- Transverse Mercator:

Scale Factor at Central Meridian: 0.9999

Longitude of Central Meridian: 18

Latitude of Projection Origin: 0

False Easting: 6500000

False Northing: 0

- Planar Coordinate Information:

Planar Coordinate Encoding Method: coordinate pair

Planar Distance Units: meters

- Geodetic Model:

Horizontal Datum Name: Militar-Geographische Institut modified

Ellipsoid Name: Bessel, 1841

Semi-major Axis: 6377397.155

Denominator of Flattening Ratio: 299.152815

Go to Top

- Metadata Reference Information:

Metadata Date: 20090530

Metadata Standard Name: FGDC Content Standards for Digital Geospatial Metadata

Metadata Standard Version: FGDC-STD-001-1998

Metadata Time Convention: local time

How to have this definition in Manifold and for export to MS SQL Spatial?

Attachments:
AssignProjection.jpg
ManifoldVersion.jpg
WrongProjection.jpg

jkelly

668 post(s)
#31-May-09 19:47

I have noticed that Sql Server does have a limited set of spatial reference systems that it supports. If you want to check to see that SQL Server supports the system you are interested in, check the view sys.spatial_reference_systems in SQL Server. If the correct definition is there, then we can deal with this. If the definition isn't there, then you will have to reproject the data and store in a different coordinate system.

If the definition is there, but manifold doesn't regonise it, then this is a manifold issue of not correlating it's spatial reference system to srids. I have noticed that Manifold does not support the entire set of sql server spatial reference systems. This is a pain, but it can be sorted. When you export, make sure you don't reproject, and go with whatever projection manifold chooses. It will be wrong, but that doesn't matter. Once exported, run an update statement in sql server, updating all srids of the geometries to the srid that you want. I think the statement is something like

--SQL

update dbo.[your table] SET geom.StSrid = 2567

where 2567 is the desired srid of your data and geom is the geometry column. Then when you link this in manifold, make sure you set the assign projection to the one you want, same as you have shown above.

When you add new shapes or update existing shapes, then manifold may get set the geometry srid wrong, but this should be able to be corrected by running the update statement I have given above. You could do this automatically by rolling it in a trigger in the database.

I recall Adam W. commenting that the srid projection stuff was in the pipeline for changing in the (hopefully) upcoming version 9 release.

Another option is to reproject into a standard projection, say maybe lat / long and export this to the database. The when you link the data back, use projected maps in your desired projection to display the data.


James K.

Kenneth96 post(s)
#28-Jul-09 13:47

Hi Jkelly,

The sys.spatial_reference_systems in SQL Server is ONLY limited for GEOGRAPHY data type.

When you export data from Manifold to SQL Server, Manifold will only export as GEOMETRY data type in SQL Server. And Geometry data type can accept any coordinate systems.

What the problem you are experiecing is:

Manifold considers ALL UTM projections with datum WGS1984. If you coordinate system datum is not WGS 1984, it will have problem. If you projection datum is WGS 1984, it will be fine.

You problem has been discussed on the forum many times. you can search out the posts.

0 msec Copyright (C) 2007-2008 Manifold.net. All rights reserved.