[Geoserver-devel] Problem inserting empty/null geometry

Hi,

I have a problem inserting empty or null geometries in PostGIS using Geoserver.

I have an Insert which contains something like
<test:table>
<test:somefield>value</test:somefield>
<test:geometryfield><gml:Point><gml:coordinates>1 1</gml:coordinates></gml:Point></test:geometryfield>
</test:table>

The example above works fine. However the geometry is not always given. When removing the <test:geometryfield> element or using an empty element like <test:geometryfield/> Geoserver throws a nulllpointerexception. Is it not possible to insert an empty or null geometry?

I encountered another problem when trying to insert a Polygon with an empty <gml:coordinates>. A GEOMETRYCOLLECTION(empty) is inserted into the PostGIS database. When Retrieving this value Geoserver throws another exceptions (TransformerException: Translator error and IllegalStateException).

Am I doing something wrong?

Thanks in advance,

Steven Fruijtier

It should be possible to insert an empty or null geometry (as long as the
backend allows it, which wouldn't be a null pointer if it was). Could you
send the stack traces, so we can see where the problem might be occurring?
Go ahead and file it as a bug in the task tracker
http://jira.codehaus.org/secure/BrowseProject.jspa?id=10311 And include
all the relevant information . geoserver version operating system, java
version, servlet container, backend database, and as much stack trace and
logging info as you can.

Thanks,

Chris

On Wed, 10 Nov 2004, Steven Fruijtier wrote:

Hi,

I have a problem inserting empty or null geometries in PostGIS using Geoserver.

I have an Insert which contains something like
<test:table>
<test:somefield>value</test:somefield>
<test:geometryfield><gml:Point><gml:coordinates>1
1</gml:coordinates></gml:Point></test:geometryfield>
</test:table>

The example above works fine. However the geometry is not always given.
When removing the <test:geometryfield> element or using an empty element
like <test:geometryfield/> Geoserver throws a nulllpointerexception. Is it
not possible to insert an empty or null geometry?

I encountered another problem when trying to insert a Polygon with an empty
<gml:coordinates>. A GEOMETRYCOLLECTION(empty) is inserted into the PostGIS
database. When Retrieving this value Geoserver throws another exceptions
(TransformerException: Translator error and IllegalStateException).

Am I doing something wrong?

Thanks in advance,

Steven Fruijtier

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--

You may also wish to include your schema file (if you have configured
geoserver in this way).

David

On Wed, 2004-11-10 at 13:13, Chris Holmes wrote:

It should be possible to insert an empty or null geometry (as long as the
backend allows it, which wouldn't be a null pointer if it was). Could you
send the stack traces, so we can see where the problem might be occurring?
Go ahead and file it as a bug in the task tracker
http://jira.codehaus.org/secure/BrowseProject.jspa?id=10311 And include
all the relevant information . geoserver version operating system, java
version, servlet container, backend database, and as much stack trace and
logging info as you can.

Thanks,

Chris

On Wed, 10 Nov 2004, Steven Fruijtier wrote:

> Hi,
>
> I have a problem inserting empty or null geometries in PostGIS using Geoserver.
>
> I have an Insert which contains something like
> <test:table>
> <test:somefield>value</test:somefield>
> <test:geometryfield><gml:Point><gml:coordinates>1
> 1</gml:coordinates></gml:Point></test:geometryfield>
> </test:table>
>
> The example above works fine. However the geometry is not always given.
> When removing the <test:geometryfield> element or using an empty element
> like <test:geometryfield/> Geoserver throws a nulllpointerexception. Is it
> not possible to insert an empty or null geometry?
>
> I encountered another problem when trying to insert a Polygon with an empty
> <gml:coordinates>. A GEOMETRYCOLLECTION(empty) is inserted into the PostGIS
> database. When Retrieving this value Geoserver throws another exceptions
> (TransformerException: Translator error and IllegalStateException).
>
> Am I doing something wrong?
>
> Thanks in advance,
>
> Steven Fruijtier
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>