Hi!<div>I think that the problem described does not involve OSGeo.KingOracle and that you would have the same problem with all other providers.</div><div><span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; color: rgb(40, 40, 40); -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">Check system </span><span class="Apple-style-span" style="font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; color: rgb(40, 40, 40); -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">decimal separator in your Regional Settings. Maybe is that causing the problem.</span></div>
<div><div><font class="Apple-style-span" color="#282828" face="verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br>
</span></font></div><div><font class="Apple-style-span" color="#282828" face="verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">Simon<br>
</span></font><br><div class="gmail_quote">On Mon, May 31, 2010 at 2:51 PM, hanko <span dir="ltr"><<a href="mailto:hana.jaborova@spatialtechnology.se">hana.jaborova@spatialtechnology.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I'm using OSGeo.KingOracle.3.4 provider. Current Culture of my application<br>
is {sv-SE}<br>
I'm attempting to create a spatial filter. I'm hitting a problem with the<br>
code below:<br>
1.<br>
using (FgfGeometryFactory geomFactory = new FgfGeometryFactory())<br>
{<br>
//create a geometry<br>
IPolygon poly =<br>
(OSGeo.FDO.Geometry.IPolygon)geomFactory.CreateGeometry("POLYGON(( 1.23<br>
4.56, 2.34 4.56, 2.34 5.78, 1.23 5.78,1.23 4.56))");<br>
<br>
//create the byte array required to create the expression<br>
byte[] byteArray = geomFactory.GetFgf(poly);<br>
OSGeo.FDO.Expression.GeometryValue qryGeomVal = new<br>
OSGeo.FDO.Expression.GeometryValue(byteArray);<br>
<br>
//create the filter<br>
OSGeo.FDO.Filter.Filter fltr;<br>
fltr = new OSGeo.FDO.Filter.SpatialCondition("Geom",<br>
OSGeo.FDO.Filter.SpatialOperations.SpatialOperations_Intersects,<br>
qryGeomVal);<br>
string filterStr = fltr.ToString();<br>
//set the filter on the query command<br>
select.SetFilter(fltr.ToString());<br>
}<br>
Value of filterStr in the debugger is:<br>
"Geom INTERSECTS GeomFromText('POLYGON ((1 4, 2 4, 2 5, 1 5, 1 4))')"<br>
(decimal part of number disappeared )<br>
<br>
2.<br>
using (FgfGeometryFactory geomFactory = new FgfGeometryFactory())<br>
{<br>
//create a geometry from a poly<br>
IDirectPosition pos1 = geomFactory.CreatePositionXY(1.23, 4.56);<br>
IDirectPosition pos2 = geomFactory.CreatePositionXY(2.34, 4.56);<br>
IDirectPosition pos3 = geomFactory.CreatePositionXY(2.34, 5.78);<br>
IDirectPosition pos4 = geomFactory.CreatePositionXY(1.23, 5.78);<br>
IDirectPosition pos5 = geomFactory.CreatePositionXY(1.23, 4.56);<br>
DirectPositionCollection coll = new DirectPositionCollection();<br>
coll.Add(pos1);<br>
coll.Add(pos2);<br>
coll.Add(pos3);<br>
coll.Add(pos4);<br>
coll.Add(pos5);<br>
ILinearRing ring = (ILinearRing)geomFactory.CreateLinearRing(coll);<br>
<br>
IPolygon poly =<br>
(OSGeo.FDO.Geometry.IPolygon)geomFactory.CreatePolygon(ring, null);<br>
<br>
//create the byte array required to create the expression<br>
byte[] byteArray = geomFactory.GetFgf(poly);<br>
OSGeo.FDO.Expression.GeometryValue qryGeomVal = new<br>
OSGeo.FDO.Expression.GeometryValue(byteArray);<br>
<br>
//create the filter<br>
OSGeo.FDO.Filter.Filter fltr;<br>
fltr = new OSGeo.FDO.Filter.SpatialCondition("Geom",<br>
OSGeo.FDO.Filter.SpatialOperations.SpatialOperations_Intersects,<br>
qryGeomVal);<br>
string filterStr = fltr.ToString();<br>
//set the filter on the query command<br>
select.SetFilter(fltr.ToString());<br>
}<br>
Value of filterStr in the debugger is:<br>
"Geom INTERSECTS GeomFromText('POLYGON ((1,23 4,56, 2,34 4,56, 2,34 5,78,<br>
1,23 5,78, 1,23 4,56))')" (dot was replaced by comma)<br>
<br>
Any ideas?<br>
<br>
Cheers<br>
<br>
Hanko<br>
<font color="#888888">--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Problems-with-FDO-Creating-a-spatial-Filter-tp5121675p5121675.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Problems-with-FDO-Creating-a-spatial-Filter-tp5121675p5121675.html</a><br>
Sent from the FDO Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
fdo-users mailing list<br>
<a href="mailto:fdo-users@lists.osgeo.org">fdo-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a><br>
</font></blockquote></div><br></div></div>