[mapguide-users] The data read from MySQL connection has incorrectcoordinate system

Dave Wilson dave.wilson at autodesk.com
Mon May 14 19:10:45 EDT 2007


Using ¡°native¡± MySQL to store your SHP files will not associate a coordinate system with the data. The SRID type column that MySQL has is for future use, but not currently used. I don¡¯t believe the MySQL FDO provider reads this value. As a result no spatial context (coordinate system and data extent) are saved with the associated connection. The result is that users must assign the coordinate system and bounds of the data manually in a map in order to see the data. Note because the coordinate system is not known the layers cannot be used in other maps where a transformation is required.

 

It¡¯s possible that a recent fix on coordinate system overrides post the current Open Source Beta may resolve the coordinate system lookup, but this won¡¯t likely resolve the extent issues. Depending on what version of Studio you have today it likely doesn¡¯t contain the override field.

 

The 4326 that you are thinking of is likely the EPSG code which is conceptually the same thing as an SRID. SRID in the context of Oracle is Oracle¡¯s own coordinate system id values. MySQL has a placeholder for SRID values, but nothing is actually defined for the 5.0 version indicating what these values are or how the server plans to use them. This functionality does not appear to be implemented yet. Whether the FDO provider could be modified to interpret MySQL SRID values as an EPSG code might be an idea worth pursuing, but would only be a workaround until such time as MySQL implements an SRID solution.

 

In the case where you use both the MySQL and SHP layers in a map using the coordinate system of the data both layers may show since no transformation needs to occur. You likely won¡¯t be able to add the MySQL layers to  a map using a UTM or other type coordinate system requiring a transformation.

 

Regards,

Dave

 

From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of fishtrees
Sent: Monday, May 14, 2007 1:53 PM
To: mapguide-users-maillist
Subject: [mapguide-users] The data read from MySQL connection has incorrectcoordinate system

 

Hi,all

I use shp2mysql.exe to convert SHP files to MySQL.

convert command is "shp2mysql -s 4326 roads1 roads_table my_db > roads.sql",
the -s option specify the SRID for roads1.shp.
and then I read from MapGuide Studio,
but the coordinate system may not be readed out from mysql database,beacause the preview of map display a incorrect coordinate system.
if I use SHP files as data resource directly,
it can be display correct with my lower left x,y and uper right x,y.

Is the WGS84's SRID 4326? or whether SHP files must be projected?
when created a mysql connection ,there is no coordinate system option in MapGuide Studio ,
or I don't know where it is.

THX very much 



  _____  

Ãâ·ÑÊÔÍæ2006Öйú×î¼ÑÍøÂçÓÎÏ·--ÃλÃÎ÷ÓÎ <http://event.mail.163.com/chanel/xyq.htm?from=163> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070514/423af5b1/attachment-0001.html


More information about the mapguide-users mailing list