<div dir="ltr">I have tested the issue with latest snapshot 2.1.0SVN for  jdbc driver. The GeometryCollection still cannot parse the String value correctly. There is a similar issue in postgis extension source codes. <a href="http://trac.osgeo.org/postgis/ticket/724">http://trac.osgeo.org/postgis/ticket/724</a> <div>
<br></div><div>So with the Java based jdbc codes it looks like we hit the same case. If I could report this as a bug to trac I would do it right away but I dont have access to there.</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On 21 December 2013 11:57, Baris Ergun <span dir="ltr"><<a href="mailto:barisergun75@gmail.com" target="_blank">barisergun75@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Remi;<div><br></div><div>Who should I get in touch about this issue related to org.postgis.GeometryCollection constructor in postgis jdbc driver.</div><div><br></div><div>Thanks.</div></div><div class="gmail_extra">
<div><div class="h5">
<br><br><div class="gmail_quote">On 18 December 2013 10:53, Baris Ergun <span dir="ltr"><<a href="mailto:barisergun75@gmail.com" target="_blank">barisergun75@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Exactly correct. I also tried to tell that the problem was originated from org.postgis.GeometryCollection constructor. So I posted to here to understand why constructor was behaving like this. This constructor is in postgis-jdbc.jar . Anyone knowing about this problem on the org.postgis.GeometryCollection constructor?</div>


<div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On 18 December 2013 10:35, Rémi Cura <span dir="ltr"><<a href="mailto:remi.cura@gmail.com" target="_blank">remi.cura@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hey,<div>using this in sql :</div><div><div>SELECT ST_AsText(ST_GeomFromText(</div><div>'GEOMETRYCOLLECTIONM(</div><div>POINTM(10 10 100),</div><div>LINESTRINGM(0 50 100, 100 50 100),</div><div>
<div>POLYGONM((25 25 100,75 25 100,75 75 100,25 75 100,25 25 100),(45 45 100,55 45 100,55 55 100,45 55 100,45 45 100))</div>
</div><div>)'</div><div>))</div></div><div><br></div><div>It gives you the expected output.<br>I would guess it is the java function you are using that is faulty (the geometrycollection constructer).</div><div><br></div>


<div>
Cheers,</div><div>Rémi-C</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/18 Baris Ergun <span dir="ltr"><<a href="mailto:barisergun75@gmail.com" target="_blank">barisergun75@gmail.com</a>></span><br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div>Hello</div><div><br></div><div>I create a GeometryCollection as below </div>
<div><br></div><div>
GeometryCollection coll = new GeometryCollection(</div><div>                            "SRID=-1;GEOMETRYCOLLECTIONM(POINTM(10 10 100),LINESTRINGM(0 50 100, 100 50 100),POLYGONM((25 25 100,75 25 100,75 75 100,25 75 100,25 25 100),(45 45 100,55 45 100,55 55 100,45 55 100,45 45 100)))"));</div>




</div><div><br></div><div>when I reprint the coll.toString() I see that my geom string is changed to below :</div><div><br></div><div>"SRID=-1;GEOMETRYCOLLECTIONM(POINT(10 10 100),LINESTRING(0 50 100, 100 50 100),POLYGON((25 25 100,75 25 100,75 75 100,25 75 100,25 25 100),(45 45 100,55 45 100,55 55 100,45 55 100,45 45 100)))"<br>




</div><div><br></div><div>As you can see GEOMETRYCOLLECTIONM is preserved but POINTM LINESTRINGM and POLYGONM is changed to POINT LINESTRING and POLYGON . And because of this I get cannot mix dimensionality when I am trying to insert this geom to database.</div>




<div><br></div><div>I have tried this with postgis jdbc driver 1.1.5; 1.3.3 and 2.0.1 versions. </div><div><br></div><div>This is a test written in datanucleus orm for geospatial extensions and the test is run against the below table (create script) in postgresql db.</div>




<div><br></div><div><div>CREATE TABLE public.samplepggeometrycollectionm</div><div>(</div><div>  samplepggeometrycollectionm_id integer NOT NULL DEFAULT nextval('samplepggeometrycollectionm_samplepggeometrycollectionm_id_seq'::regclass),</div>




<div>  geom geometry(GeometryCollectionM),</div><div>  id bigint NOT NULL,</div><div>  name character varying(255),</div><div>  CONSTRAINT samplepggeometrycollectionm_pkey PRIMARY KEY (samplepggeometrycollectionm_id)</div>




<div>)</div><div>WITH (</div><div>  OIDS=FALSE</div><div>);</div><div>ALTER TABLE public.samplepggeometrycollectionm</div><div>  OWNER TO postgres;</div></div><div><br></div><div>Awaiting ur suggestions.</div><span><font color="#888888">-- <br>



<div dir="ltr">
Baris<div><br></div></div>
</font></span></div>
<br></div></div>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br><br clear="all"><div><br></div></div></div>

<span><font color="#888888">-- <br><div dir="ltr">
Barýţ<div><a href="http://www.linkedin.com/in/barisergun" target="_blank">www.linkedin.com/in/barisergun</a><br></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr">Barýţ<div><a href="http://www.linkedin.com/in/barisergun" target="_blank">www.linkedin.com/in/barisergun</a><br>
</div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Barýţ<div><a href="http://www.linkedin.com/in/barisergun" target="_blank">www.linkedin.com/in/barisergun</a><br></div></div>
</div>