<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff dir=ltr>
<DIV> </DIV>
<DIV>Hi Eliot,</DIV>
<DIV> </DIV>
<DIV>I'm being told that the problem you are seeing (in preview Studio) may be
caused by switching an existing layer's feature source from lines to
polygons while the layer still thinks it should be working with line
geometry. You can try creating a blank layer and linking it to your polygon
feature source -- this might work.</DIV>
<DIV> </DIV>
<DIV>Traian</DIV>
<DIV> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT size=2>-----Original Message----- <BR><B>From:</B> Eliot Cline
[mailto:eliot@gospatial.com] <BR><B>Sent:</B> Fri 6/30/2006 5:49 AM
<BR><B>To:</B> users@mapguide.osgeo.org <BR><B>Cc:</B> <BR><B>Subject:</B> Re:
[mapguide-users] OGR Provider in FC4<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi Traian,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Well, it seems you were correct. It looks like I
read too much into the readme file, thinking that I should not mess with the
gdal/geos that came with mgos. I recompiled mgos to use the gdal/geos versions
we require for our pgsql applications. All seemded ok in that I can create
layers on the OGR data source. One other problem has now cropped up. If I try
to style a polygon or point layer using rules I get this error from
Studio:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>System.NullReferenceException: Object reference
not set to an instance of an object.<BR> at
Autodesk.MapGuide.Studio.UI.StyleEditor.LineEditor.set_Rule(MdfLineRule
value)<BR> at
Autodesk.MapGuide.Studio.UI.StyleEditor.ColumnStyles.SymbolizationsColumnStyle.Edit(CurrencyManager
source, Int32 rowNum, Rectangle bounds, Boolean readOnly, String instantText,
Boolean cellIsVisible)<BR> at
System.Windows.Forms.DataGrid.Edit(String displayText)<BR> at
System.Windows.Forms.DataGrid.BeginEdit(DataGridColumnStyle gridColumn, Int32
rowNumber)<BR> at
Autodesk.MapGuide.Studio.UI.StyleEditor.FeatureTypeStyleEditor.EditCurrentCell()</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Actually there is quite a bit more. Just copied
the first few lines. The error seems to be from Studio, no error on the server
side. Line layers work fine, only seems to be polys and points that generate
an error. If I style the layer globally, i.e. no rules, it works. But we need
to be able to specify styles conditionally. Let me know if there is a fix for
this one.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Eliot</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A
title=traian.stanev@autodesk.com
href="mailto:traian.stanev@autodesk.com">Traian Stanev</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=users@mapguide.osgeo.org
href="mailto:users@mapguide.osgeo.org">users@mapguide.osgeo.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, June 29, 2006 8:01
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [mapguide-users] OGR
Provider in FC4</DIV>
<DIV><BR></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=276044912-29062006><FONT face=Arial
color=#0000ff size=2>Yeah this one is difficult. For what it's worth, I
would have gone the other way around when moving libraries: any library that
is already installed in /usr/local, I would have simply deleted from the
mapguide directory (things like xerces, libACE, gdal, etc). Come to think of
it, MapGuide builds against a copy of gdal 1.3.0 while the provider was
written against gdal 1.3.2 and uses function calls that don't exist
in 1.3.0. So if it's picking up the wrong gdal at runtime, it will
definitely not work. Ouch... </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=276044912-29062006><FONT face=Arial
color=#0000ff size=2>To work around similar issues on Windows I linked in
all required libraries statically into the provider dll, but that's not
really an option on Linux.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=276044912-29062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=276044912-29062006><FONT face=Arial
color=#0000ff size=2>Traian</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Eliot Cline
[mailto:eliot@gospatial.com] <BR><B>Sent:</B> Thursday, June 29, 2006 1:21
AM<BR><B>To:</B> users@mapguide.osgeo.org<BR><B>Subject:</B> Re:
[mapguide-users] OGR Provider in FC4<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hello Traian,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks for all your help. So far no joy. I
manually created the datasource as per your instructions. After starting
Studio, the new resource shows, but when trying to create a layer based on
the new data source, I just get the same error as before.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>One thing I noticed is that mgserver was
segfaulting on exit. Should have noticed it before, but my eyes aren't so
good after years in front of computer screens! I ran mgerver in gdb, let it
segfault and ran a backtrace. The odd thing was that the mgserver was
loading geos from /usr/local/lib instead of
/usr/local/mapguideopensoure/lib. I reconfigured mapguide and saw that
although the configure script was looking for gdal in
/usr/local/mapguideopensoure/lib it was grabbing geos from /usr/local/lib. I
moved my copy of geos to another folder and re-ran config. This time it
couldn't find geos at all. After some messing around it compiled OK using
the geos included with mgos. Ran the server and it still segfaulted on exit.
Back to the drawing board and configured without geos support. After that no
more segfault, but still the same problem with the OGR provider.
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>My FC4 setup is pretty much straight out of the
box except for the upgrade to gcc 4.0.2. pgsql is 8.1.2, postgis 1.1.1, gdal
1.3.2, geos2.2.2, and all are installed in default locations
(e.g. /usr/local for everything). I'm stumped on this one.....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Eliot Cline</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A
title=traian.stanev@autodesk.com
href="mailto:traian.stanev@autodesk.com">Traian Stanev</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=users@mapguide.osgeo.org
href="mailto:users@mapguide.osgeo.org">users@mapguide.osgeo.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, June 28, 2006 8:03
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [mapguide-users] OGR
Provider in FC4</DIV>
<DIV><BR></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2>Hi Eliot,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2>This error (CLNT_8_UNABLE_TO_LOAD_LIBRARY) shows that MapGuide is
trying to load a provider but failing. It can happen either because
of missing dependencies (which you don't seem to have), mismatched
provider version (which seems ok for you) or because it can't find the
symbol "CreateConnection()" in the provider .so. I can't think of another
reason it won't load, but I will try compiling it on FC4 and see if it
works for me.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2>One thing you can try is to manually set up an OGR
feature source, using the MapGuide html pages at:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
color=#0000ff size=2><A
href="http://localhost:8008/mapguide/mapagent/index.html">http://localhost:8008/mapguide/mapagent/index.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2>Edit the attached xml file to have the correct DataSource value
(and also fix the Windows-style newlines :-), and then use the SetResource
page to upload it to the server. You will need to set the Content
field in the SetResource page to that file. After executing the
SetResource, you should be able to see this feature source in Studio and
create a layer based on it. When you point the new layer to this feature
source, it will either succeed or show an error. If it shows an error, it
would be a good time to check the log again. Also, if possible, run the
server from the command prompt and watch if it prints out any errors or
warnings.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181553212-28062006><FONT face=Arial
size=2>Traian</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=181553212-28062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Eliot Cline
[mailto:eliot@gospatial.com] <BR><B>Sent:</B> Wednesday, June 28, 2006
12:09 AM<BR><B>To:</B> users@mapguide.osgeo.org<BR><B>Subject:</B> Re:
[mapguide-users] OGR Provider in FC4<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hello Traian,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you for your help. Yes, the compilation
went fine for both the MGOS software and relevant components. I had some
problems with the mgserver hanging, as well as the "make check" step for
compiling the debug profile. Fixed that by upgrading gcc to 4.0.2. My
entry in providers.xml is:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<FeatureProvider><BR> <Name>OSGeo.OGR.0.1</Name><BR> <DisplayName>FDO
Provider forr OGR</DisplayName><BR> <Description>Access
to OGR data
sources</Description><BR> <IsManaged>False</IsManaged><BR> <Version>0.1.0.0</Version><BR> <FeatureDataObjectsVersion>3.0.0.0</FeatureDataObjectsVersion><BR> <LibraryPath>/usr/local/fdo-3.0.0/lib/libOGRProvider.so</LibraryPath><BR>
</FeatureProvider> </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Shape and SDF providers are working fine, but
unfornately they are of no use to me. I checked the server error log and
there were some messages about FDO. The funny things is that these
messages showed up in the log yesterday morning. I have been messing about
constantly since then and no more error mesages of any kind have been
written to the log since that time. I even changed the name of
libOGRProvider.so in providers.xml hoping to force an error of some kind
just to see if there was any attempt by the server to actually load the
.so file. Here is the message I found in the log:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><2006-06-27T08:45:14>
<BR> Error: An exception occurred in FDO
component.<BR>
CLNT_8_UNABLE_TO_LOAD_LIBRARY<BR> StackTrace:<BR> -
MgOpTestFeatureSourceConnection.Execute line 104 file
OpTestFeatureSourceConnection.cpp<BR> - MgFdoConnectionManager.Open
line 263 file FdoConnectionManager.cppAn exception occurred in FDO
component.<BR>CLNT_8_UNABLE_TO_LOAD_LIBRARY</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is the only error in the log, but is
repeated a number of time. Ran ldd - r on libOGRProvider.so and it looks
ok, output is below. One other strange thing, that is a little off-topic,
is that apache is now spitting a dummy when I try to shut it down with
apachectl --stop. It throws this error:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>(98)Address already in use: make_sock: could
not bind to address [::]:8008<BR>no listening sockets available, shutting
down<BR>Unable to open logs</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The only thing listening to 8008 is apache,
so I don't get this one at all. All was well until I upgraded gcc. Don't
know if it is related or not, but if anybody has seen this and knows how
to fix it, please let me know.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Eliot Cline</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Below is the output of ldd -r
libOGRProvider.so </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> linux-gate.so.1 =>
(0x003e3000)<BR> libFdo.so.3 =>
/usr/local/fdo-3.0.0/lib/libFdo.so.3 (0x00516000)<BR> libgdal.so.1
=> /usr/local/lib/libgdal.so.1 (0x00bb2000)<BR> libstdc++.so.6
=> /usr/lib/libstdc++.so.6 (0x00185000)<BR> libm.so.6 =>
/lib/libm.so.6 (0x00111000)<BR> libgcc_s.so.1 =>
/lib/libgcc_s.so.1 (0x00135000)<BR> libc.so.6 => /lib/libc.so.6
(0x00264000)<BR> libxalan-c.so =>
/usr/local/fdo-3.0.0/lib/libxalan-c.so
(0x00f13000)<BR> libxalanMsg.so.17 =>
/usr/local/fdo-3.0.0/lib/libxalanMsg.so.17
(0x0013f000)<BR> libxerces-c.so.25 =>
/usr/local/fdo-3.0.0/lib/libxerces-c.so.25
(0x07cbc000)<BR> libpthread.so.0 => /lib/libpthread.so.0
(0x00147000)<BR> libdl.so.2 => /lib/libdl.so.2
(0x00159000)<BR> libgeos.so.2 => /usr/local/lib/libgeos.so.2
(0x008a3000)<BR> libungif.so.4 => /usr/lib/libungif.so.4
(0x0015d000)<BR> libjpeg.so.62 => /usr/lib/libjpeg.so.62
(0x00165000)<BR> libtiff.so.3 => /usr/lib/libtiff.so.3
(0x0038e000)<BR> libpng12.so.0 => /usr/lib/libpng12.so.0
(0x003e4000) <BR> libpq.so.4 =>
/usr/local/pgsql/lib/libpq.so.4 (0x00408000)<BR> libz.so.1 =>
/usr/lib/libz.so.1 (0x0041f000)<BR> librt.so.1 => /lib/librt.so.1
(0x00432000)<BR> /lib/ld-linux.so.2 (0x00b96000)<BR> libSM.so.6
=> /usr/X11R6/lib/libSM.so.6 (0x00a61000)<BR> libICE.so.6 =>
/usr/X11R6/lib/libICE.so.6 (0x00446000)<BR> libX11.so.6 =>
/usr/X11R6/lib/libX11.so.6 (0x00a6a000)<BR> libcrypt.so.1 =>
/lib/libcrypt.so.1 (0x00460000)<BR> libresolv.so.2 =>
/lib/libresolv.so.2 (0x0048e000)<BR> libnsl.so.1 =>
/lib/libnsl.so.1 (0x004a1000)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A
title=traian.stanev@autodesk.com
href="mailto:traian.stanev@autodesk.com">Traian Stanev</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=users@mapguide.osgeo.org
href="mailto:users@mapguide.osgeo.org">users@mapguide.osgeo.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, June 27, 2006 7:44
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [mapguide-users] OGR
Provider in FC4</DIV>
<DIV><BR></DIV>
<DIV dir=ltr align=left><SPAN class=127432912-27062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=127432912-27062006><FONT face=Arial
color=#0000ff size=2>It could be several things causing this. I assume
you compiled and installed the provider successfully (by adding an entry
to providers.xml), since you get a Data Connection page for it in
Studio. One thing I would check is whether the libOGRProvider.so has
missing dependencies (by running ldd -r on it). Also check the MapGuide
server error log for any Fdo exceptions -- there should be a message if
it can't even create a connection to OGR. If you run the server from a
command line (using /interactive), you will also be able to see the
exceptions printed on the console (the OGR provider may also print
some debug information to the console that you won't see in the logs).
Also make sure the FDO version listed in providers.xml entry for OGR
matches the versions listed for the other providers (there are some
overzealous version checks in the 1.0 code).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=127432912-27062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=127432912-27062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=127432912-27062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=127432912-27062006><FONT face=Arial
color=#0000ff size=2>Traian</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Eliot Cline
[mailto:eliot@gospatial.com] <BR><B>Sent:</B> Tuesday, June 27, 2006
12:03 AM<BR><B>To:</B> users@mapguide.osgeo.org<BR><B>Subject:</B>
[mapguide-users] OGR Provider in FC4<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I just got MGOS up and running today on
Fedora Core 4. I am trying to use the OGR provider to access data in
PostgreSQL. When I try to create a new data connection in Studio, the
connection properties section is blank. No "DataSource" or "ReadOnly"
properties showing. Any help would be appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Eliot Cline</FONT></DIV></BLOCKQUOTE>
<P>
<HR>
<P></P>---------------------------------------------------------------------<BR>To
unsubscribe, e-mail: users-unsubscribe@mapguide.osgeo.org<BR>For
additional commands, e-mail:
users-help@mapguide.osgeo.org</BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>