tag:blogger.com,1999:blog-1951542926024108564.post5276270541408288984..comments2024-01-12T19:52:27.760+11:00Comments on The Map Guy(de): Using FDO Schema OverridesJackie Nghttp://www.blogger.com/profile/14319639645667992869noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-1951542926024108564.post-85254063495303755572014-09-05T18:09:52.599+10:002014-09-05T18:09:52.599+10:00I have managed solve the problem in Oracle.....
H...I have managed solve the problem in Oracle.....<br /><br />Here is the solution. Oracle requires that you have a <b>Primary Key Constraint</b> on the spatial / geometry data.<br /><br />So here is what I have done...<br /><br /><b>By way of my naming conventions and assumptions:</b><br />1) I always have a field named GID which is unique and populated by a trigger.<br /> You can use an existing data field, however there MUST be a unique field AND that field <b>must</b> have a Primary Key constraint. <br /><br />2.1) The spatial data has metadata created for it.<br /><br />2.2) The name for the spatial index (which exists) is SP_TableName_$X.<br /><br /> (e.g. SP_SEWCATCHMENT_$X). <br /> -- THE SQL FOR THE CREATE INDEX WILL BE SOMETHING LIKE THIS....<br /> CREATE INDEX GIS.SP_SEWCATCHMENT_$X<br /> ON GIS.SP_SEWCATCHMENT(GEOMETRY)<br /> INDEXTYPE IS MDSYS.SPATIAL_INDEX <br /> PARAMETERS('sdo_indx_dims=2, tablespace=GISINDEX, work_tablespace=GISINDEX');<br /><br />3) The geometry column is ALWAYS ALWAYS named GEOMETRY. <br /><br />4) All spatial tables in Oracle begins with a table name of 'SP_'<br /><br /><br />My example will use a spatial layer called.... SP_SEWCATCHMENT.<br /><br />--1) Check for a GID; <br /><br />DESC SP_SEWCATCHMENT<br />Name Null Type <br />--------- -------- -------------- <br />GEOM_AREA NUMBER <br />COMMENTS VARCHAR2(150) <br />TAG_X NUMBER <br />TAG_Y NUMBER <br />TAG_VALUE VARCHAR2(40) <br />TAG_SIZE NUMBER <br />TAG_ANGLE NUMBER <br />TAG_JUST CHAR(2) <br />GEOMETRY SDO_GEOMETRY() <br />SUB_BASIN VARCHAR2(9) <br />OUTFALL VARCHAR2(30)<br /><br />--2) Create the GID<br />ALTER TABLE SP_SEWCATCHMENT<br />ADD<br />(<br /> GID NUMBER(38,0)<br />);<br /><br />--3) Pupulate the GID with Values from a sequence, in my case it is called <i>Munseq_GID.</i><br /><br />UPDATE SP_SEWCATCHMENT<br />set GID = Munseq_GID.nextval;<br />commit;<br /><br />--4) Build an index on the GID<br /><br />CREATE UNIQUE INDEX SP_SEWCATCHMENT_GID ON SP_SEWCATCHMENT(GID);<br /><br /><br />--5) Add the Primary Key constraint, without which you cannot select FEATURES in map guide.<br />ALTER TABLE SP_SEWCATCHMENTADD CONSTRAINT SP_SEWCATCHMENT_PK PRIMARY KEY (GID) USING INDEX SP_SEWCATCHMENT_GID ;<br /><br />commit;<br /><br />--5) You can now add the data to MGOS and it will be selectable and you wont get a warning something like this...<br /><br />Warning - Warning_MapDefinition_UnselectableLayer: Layer WATER is marked as selectable but its feature class KingOra:GIS~SP_SEWCATCHMENT~GEOMETRY in (Library://Jwater/Data/data_conn_gis.FeatureSource) has no identity properties. This layer will not be selectable.<br /><br />Hope this helps someone.Anonymoushttps://www.blogger.com/profile/17148964161280268163noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-36433587813066519212014-09-05T00:33:38.871+10:002014-09-05T00:33:38.871+10:00@Craig
I solved this by deleting the non-spatial ...@Craig<br /><br />I solved this by deleting the non-spatial tables in FDO toolbox (ie deleting them in the schema, not the database) and exporting the schema without them. Is there a reason you need to see them in Maestro? If you are trying to do joins there, its probably best done on the server side using views. That's what I did and I then assigned primary keys to the spatial views, as detailed in Jackie's post. Works a treat.Brandonhttps://www.blogger.com/profile/05609213461777210329noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-20646828827520130912014-09-04T04:37:44.725+10:002014-09-04T04:37:44.725+10:00I would like to thank you for the informative blog...I would like to thank you for the informative blog. It is the only article on this subject that I have been able to source on the Internet.<br /><br />Could you please give me some pointers.<br /><br />I am using MGOS on Oracle 11.0.2.4. I am getting <b>many</b> layers in Maestro validation that are similar to the message below.<br /><br />Warning - Warning_MapDefinition_UnselectableLayer: Layer SP_SEWGPIPE_C is marked as selectable but its feature class KingOra:JWATER~SP_SEWGPIPE_C~GEOMETRY in (Library://Jwater/Data/data_conn_jwater.FeatureSource) has no identity properties. This layer will not be selectable.<br /><br /><br />I believe that this error arises because I do not have <b>identity properties</b> specified.<br /><br /><br />I have not been able to pull out the xml Schema document you describe? All the data are tables and not spatial views as in your example.<br /><br />I would appreciate any pointers you may have. The Select Tool on many layers is not working as a result of this problem and I do not know how to fix this problem.<br /><br /><br />Thank you very much in anticipation.<br /><br />Regards<br />CraigAnonymoushttps://www.blogger.com/profile/17148964161280268163noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-4575234926761566302013-10-05T01:21:04.246+10:002013-10-05T01:21:04.246+10:00I have the same error as the above post. Trying to...I have the same error as the above post. Trying to export the xml config after selecting a primary key for a postgis view. MG 2.5.1 x64, FDO TB 1.2 x64, postgis 1.5.5, all on windows.Brandonhttps://www.blogger.com/profile/05609213461777210329noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-82062186361964615242013-10-05T01:19:57.413+10:002013-10-05T01:19:57.413+10:00I have the same error as the above post. Trying to...I have the same error as the above post. Trying to export the xml config after selecting a primary key for a postgis view. MG 2.5.1 x64, FDO TB x64, postgis 1.5.5 all on windows.Brandonhttps://www.blogger.com/profile/05609213461777210329noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-27271811474197819462013-09-16T00:15:02.464+10:002013-09-16T00:15:02.464+10:00Hi Jackie,
Tried to get a dump of a SQL Server 20...Hi Jackie,<br /><br />Tried to get a dump of a SQL Server 2008 schema using the latest FDO Toolbox (tried both x64 & x86). It tosses an error -<br />Exception Occurred: System.Collections.Generic.KeyNotFoundException. The given key was not in the dictionary. This is against MGOS 2.5. This is when using the "Export Data Store Configuration" commandFirecassidyBloglerhttps://www.blogger.com/profile/16714638424278365464noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-25110730259756757172011-06-23T23:33:14.168+10:002011-06-23T23:33:14.168+10:00Yes, it is an FDO database. I didn't think th...Yes, it is an FDO database. I didn't think there was any other way to store polygons in SQL Server using FDO. I was able to get it to work (sort of) by manually creating the FDO metadata for my view. Not as elegant as I would like, but it seems to work well enough for what I need.Rizzohttps://www.blogger.com/profile/05984482689242960397noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-35382874180364869042011-06-23T11:50:34.591+10:002011-06-23T11:50:34.591+10:00Does this database have FDO metadata tables (ie. t...Does this database have FDO metadata tables (ie. tables that start with f_)?<br /><br />If so, this technique will not work for you.Jackie Nghttps://www.blogger.com/profile/14319639645667992869noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-8599737017464481652011-06-11T05:56:10.170+10:002011-06-11T05:56:10.170+10:00Hi Jackie,
I'm having a little trouble with t...Hi Jackie,<br /><br />I'm having a little trouble with this. I created a view, but none of my views (or other tables) are listed as feature classes in FDO Toolbox. I can see my other feature classes, just not my custom tables & views. Any idea what I'm doing wrong?<br /><br />JonRizzohttps://www.blogger.com/profile/05984482689242960397noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-60421927812155686352011-06-11T05:54:02.230+10:002011-06-11T05:54:02.230+10:00Hi Jackie,
I'm having a little trouble with t...Hi Jackie,<br /><br />I'm having a little trouble with this. I created a view, but none of my views are listed in FDO Toolbox. In fact, the only tables listed are the feature class tables. Any idea what I'm doing wrong?<br /><br />JonRizzohttps://www.blogger.com/profile/05984482689242960397noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-9636392488763134102011-05-30T18:44:06.942+10:002011-05-30T18:44:06.942+10:00Since 1.0 beta 2, the "Dump Schema Mappings&q...Since 1.0 beta 2, the "Dump Schema Mappings" command is renamed to "Export Data Store Configuration to XML" to reflect its proper functionJackie Nghttps://www.blogger.com/profile/14319639645667992869noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-71859439040908643532011-05-30T18:14:52.470+10:002011-05-30T18:14:52.470+10:00I downloaded the latest version FDO Toolbox 1.0.0....I downloaded the latest version FDO Toolbox 1.0.0.1227. I can't to find the Dump Schema Mapping command on the context menu. Where is the command? Thanks.erictsnhttps://www.blogger.com/profile/08267155801671340025noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-21705163649752992602011-05-13T00:37:36.213+10:002011-05-13T00:37:36.213+10:00I tried to override schema with new 1.0.0.1200 Too...I tried to override schema with new 1.0.0.1200 Toolbox but when I try to load in new Maestro 3.0 I got a validation error .<br /> "Object reference not set an instance of an object" and can't save . I use MGE 2012,sql server 2008 R2.kalmyhttps://www.blogger.com/profile/17826955048487618304noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-70662345865911388852010-09-11T01:59:07.938+10:002010-09-11T01:59:07.938+10:00Thx Jackie....Thx Jackie....kcheng007https://www.blogger.com/profile/08181941584213580102noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-44753547919275992512010-09-06T19:41:46.214+10:002010-09-06T19:41:46.214+10:00Oh Jackie, I'm so sorry :-)
Stupid Visual Stu...Oh Jackie, I'm so sorry :-)<br /><br />Stupid Visual Studio did not formatted well XML and I saw incomplete file :/<br /><br />Everything is absolutely perfect! Thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-69330846820402751222010-09-06T19:34:36.599+10:002010-09-06T19:34:36.599+10:00Jackie,
I've just downloaded 0.9.6 version an...Jackie,<br /><br />I've just downloaded 0.9.6 version and duped schema mapping is pretty much different than schema from 1.0 beta.<br /><br />I will try with 0.9.6.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-10771535186767477642010-09-06T19:25:54.048+10:002010-09-06T19:25:54.048+10:00Yes, I have noticed that MSM is broken. It's w...Yes, I have noticed that MSM is broken. It's weird, I'm using the same provider as you, MS SQL 2008 Spatial..<br /><br />Check this out <a rel="nofollow">zipped xml file</a>.<br /><br />I have view vObjectVer where is objectId "unique" and should be an ID. I tried everything, followed your steps, declaring "objectId" as identityPropertyName in complex type tag - but unsuccessful.<br /><br />If you can take a look I would appreciate it.<br /><br />Thank you.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-84995043247458241762010-09-06T19:11:43.225+10:002010-09-06T19:11:43.225+10:00The SchemaMapping part of the XML document varies ...The SchemaMapping part of the XML document varies from provider to provider. The *.Overrides.dll contain the logic to read/write these specific fragments. <br /><br />Also the "Manage Schema mappings" option is broken atm. It will be merged into the existing schema editor, which itself will be tweaked before the final releaseJackie Nghttps://www.blogger.com/profile/14319639645667992869noreply@blogger.comtag:blogger.com,1999:blog-1951542926024108564.post-41649418564486231462010-09-06T19:06:13.122+10:002010-09-06T19:06:13.122+10:00Hello Jackie,
can we do the same with "Manag...Hello Jackie,<br /><br />can we do the same with "Manage Schema mappings" option?<br /><br />I was trying to solve my problem following your steps but it seems that XML document is pretty much different (the structure of XML) than yours.Anonymousnoreply@blogger.com