[Geoserver-devel] Re: How can I retrieve a set of properties of the features in a DWithin filter

<GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
  <Query typeName="ejes">
    <PropertyName>codigopost</PropertyName>
    <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
      <DWithin>
        <PropertyName>the_geom</PropertyName>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates>443454.0,4478531.0</gml:coordinates>
        </gml:Point>
        <Distance
unit="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
      </DWithin>
    </Filter>
  </Query>
</GetFeature>

The query is this.
I miswrote it the other day because I didn't remember the exact form of
it. When I try to execute this query I get the following exception:

java.lang.NullPointerException
  at
org.geotools.filter.CartesianDistanceFilter.contains(CartesianDistanceFilter.java:130)
  at
org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:675)
  at
org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
  at
org.vfny.geoserver.responses.FeatureResponse.getQuery(FeatureResponse.java:252)
  at
org.vfny.geoserver.responses.FeatureResponse.getXmlResponse(FeatureResponse.java:112)
  at
es.pfc.hbarriuso.geoserver.util.WFSServer.getFeature(WFSServer.java:137)
  at
es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.getAttributes(GeoserverSoapBindingImpl.java:33)
  at
es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.main(GeoserverSoapBindingImpl.java:113)

The classes es.pfc.* belong to my application. I'm trying to envelope
the request and responses of GeoServer within a Web Services framework.
So I don' use the servlets, but I instead use the classes of Geoserver
and Geotools.
I hope this helps to get an answer.
Thanks in advance

---Publicidad--------------------------------------------------------
Juega con Ventura24.es, lotero?=a inteligente y multiplica tus
posibilidades!! http://www.iespana.es/_reloc/email.ventura

try units= instead of unit=

On Sun, 2003-11-02 at 04:19, Hector Hugo Barriuso Mata wrote:

<GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
  <Query typeName="ejes">
    <PropertyName>codigopost</PropertyName>
    <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
      <DWithin>
        <PropertyName>the_geom</PropertyName>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates>443454.0,4478531.0</gml:coordinates>
        </gml:Point>
        <Distance
unit="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
      </DWithin>
    </Filter>
  </Query>
</GetFeature>

The query is this.
I miswrote it the other day because I didn't remember the exact form of
it. When I try to execute this query I get the following exception:

java.lang.NullPointerException
  at
org.geotools.filter.CartesianDistanceFilter.contains(CartesianDistanceFilter.java:130)
  at
org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:675)
  at
org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
  at
org.vfny.geoserver.responses.FeatureResponse.getQuery(FeatureResponse.java:252)
  at
org.vfny.geoserver.responses.FeatureResponse.getXmlResponse(FeatureResponse.java:112)
  at
es.pfc.hbarriuso.geoserver.util.WFSServer.getFeature(WFSServer.java:137)
  at
es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.getAttributes(GeoserverSoapBindingImpl.java:33)
  at
es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.main(GeoserverSoapBindingImpl.java:113)

The classes es.pfc.* belong to my application. I'm trying to envelope
the request and responses of GeoServer within a Web Services framework.
So I don' use the servlets, but I instead use the classes of Geoserver
and Geotools.
I hope this helps to get an answer.
Thanks in advance

---Publicidad--------------------------------------------------------
Juega con Ventura24.es, lotera inteligente y multiplica tus
posibilidades!! http://www.iespana.es/_reloc/email.ventura

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

I have tried units and it's not the problem. It's indifferent unit or
units, it works whatever the word is.
The problem is in the line <PropertyName>codigopost</PropertyName>,
because if I remove it I get all the features in a radius of 100 meters
from the point of reference.
Any help?

El dom, 02-11-2003 a las 18:17, Doug Cates escribió:

try units= instead of unit=

On Sun, 2003-11-02 at 04:19, Hector Hugo Barriuso Mata wrote:
> <GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <Query typeName="ejes">
> <PropertyName>codigopost</PropertyName>
> <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <DWithin>
> <PropertyName>the_geom</PropertyName>
> <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
> <gml:coordinates>443454.0,4478531.0</gml:coordinates>
> </gml:Point>
> <Distance
> unit="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
> </DWithin>
> </Filter>
> </Query>
> </GetFeature>
> ===========================================
>
> The query is this.
> I miswrote it the other day because I didn't remember the exact form of
> it. When I try to execute this query I get the following exception:
>
> java.lang.NullPointerException
> at
> org.geotools.filter.CartesianDistanceFilter.contains(CartesianDistanceFilter.java:130)
> at
> org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:675)
> at
> org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
> at
> org.vfny.geoserver.responses.FeatureResponse.getQuery(FeatureResponse.java:252)
> at
> org.vfny.geoserver.responses.FeatureResponse.getXmlResponse(FeatureResponse.java:112)
> at
> es.pfc.hbarriuso.geoserver.util.WFSServer.getFeature(WFSServer.java:137)
> at
> es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.getAttributes(GeoserverSoapBindingImpl.java:33)
> at
> es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.main(GeoserverSoapBindingImpl.java:113)
>
> The classes es.pfc.* belong to my application. I'm trying to envelope
> the request and responses of GeoServer within a Web Services framework.
> So I don' use the servlets, but I instead use the classes of Geoserver
> and Geotools.
> I hope this helps to get an answer.
> Thanks in advance
>
>
> ---Publicidad--------------------------------------------------------
> Juega con Ventura24.es, lotera inteligente y multiplica tus
> posibilidades!! http://www.iespana.es/_reloc/email.ventura
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

---Publicidad--------------------------------------------------------
nete a los miles de sin pareja en Meetic... te vas a enamorar!
http://www.iespana.es/_reloc/email.meetic

---Publicidad--------------------------------------------------------
�nete a los miles de sin pareja en Meetic... �te vas a enamorar!
http://www.iespana.es/_reloc/email.meetic

I have resolved my error.
When I was querying a set of properties, I didn't ask for the_geom
property of the DWithin filter, so it couldn't resolve if the feature
was or not inside the distance I specified.
Maybe this helps other people.
Now the query is:
<GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
  <Query typeName="ejes">
    <PropertyName>the_geom</PropertyName>
    <PropertyName>codigopost</PropertyName>
    <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
      <DWithin>
        <PropertyName>the_geom</PropertyName>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates>443454.0,4478531.0</gml:coordinates>
        </gml:Point>
        <Distance
units="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
      </DWithin>
    </Filter>
  </Query>
</GetFeature>

El dom, 02-11-2003 a las 18:17, Doug Cates escribió:

try units= instead of unit=

On Sun, 2003-11-02 at 04:19, Hector Hugo Barriuso Mata wrote:
> <GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <Query typeName="ejes">
> <PropertyName>codigopost</PropertyName>
> <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <DWithin>
> <PropertyName>the_geom</PropertyName>
> <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
> <gml:coordinates>443454.0,4478531.0</gml:coordinates>
> </gml:Point>
> <Distance
> unit="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
> </DWithin>
> </Filter>
> </Query>
> </GetFeature>
> ===========================================
>
> The query is this.
> I miswrote it the other day because I didn't remember the exact form of
> it. When I try to execute this query I get the following exception:
>
> java.lang.NullPointerException
> at
> org.geotools.filter.CartesianDistanceFilter.contains(CartesianDistanceFilter.java:130)
> at
> org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:675)
> at
> org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
> at
> org.vfny.geoserver.responses.FeatureResponse.getQuery(FeatureResponse.java:252)
> at
> org.vfny.geoserver.responses.FeatureResponse.getXmlResponse(FeatureResponse.java:112)
> at
> es.pfc.hbarriuso.geoserver.util.WFSServer.getFeature(WFSServer.java:137)
> at
> es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.getAttributes(GeoserverSoapBindingImpl.java:33)
> at
> es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.main(GeoserverSoapBindingImpl.java:113)
>
> The classes es.pfc.* belong to my application. I'm trying to envelope
> the request and responses of GeoServer within a Web Services framework.
> So I don' use the servlets, but I instead use the classes of Geoserver
> and Geotools.
> I hope this helps to get an answer.
> Thanks in advance
>
>
> ---Publicidad--------------------------------------------------------
> Juega con Ventura24.es, lotera inteligente y multiplica tus
> posibilidades!! http://www.iespana.es/_reloc/email.ventura
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel

---Publicidad--------------------------------------------------------
Juega con Ventura24.es, lotera inteligente y multiplica tus
posibilidades!! http://www.iespana.es/_reloc/email.ventura

---Publicidad--------------------------------------------------------
�nete a los miles de sin pareja en Meetic... �te vas a enamorar!
http://www.iespana.es/_reloc/email.meetic

Sorry about that. I wasn't on email this weekend to respond, I'm glad you
figured it out without too much grief. It's actually come up on the
mailing list before, but we should put it in a more obvious place. I'm
pretty sure the problem should be fixed in the next release, as Jody
Garnett was dealing with that issue on our latest geotools changes to roll
into geoserver.

  Chris

On Sun, 2 Nov 2003, Hector Hugo Barriuso Mata wrote:

I have resolved my error.
When I was querying a set of properties, I didn't ask for the_geom
property of the DWithin filter, so it couldn't resolve if the feature
was or not inside the distance I specified.
Maybe this helps other people.
Now the query is:
<GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
  <Query typeName="ejes">
    <PropertyName>the_geom</PropertyName>
    <PropertyName>codigopost</PropertyName>
    <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
      <DWithin>
        <PropertyName>the_geom</PropertyName>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates>443454.0,4478531.0</gml:coordinates>
        </gml:Point>
        <Distance
units="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
      </DWithin>
    </Filter>
  </Query>
</GetFeature>

El dom, 02-11-2003 a las 18:17, Doug Cates escribió:
> try units= instead of unit=
>
>
> On Sun, 2003-11-02 at 04:19, Hector Hugo Barriuso Mata wrote:
> > <GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> > <Query typeName="ejes">
> > <PropertyName>codigopost</PropertyName>
> > <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> > <DWithin>
> > <PropertyName>the_geom</PropertyName>
> > <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
> > <gml:coordinates>443454.0,4478531.0</gml:coordinates>
> > </gml:Point>
> > <Distance
> > unit="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
> > </DWithin>
> > </Filter>
> > </Query>
> > </GetFeature>
> > ===========================================
> >
> > The query is this.
> > I miswrote it the other day because I didn't remember the exact form of
> > it. When I try to execute this query I get the following exception:
> >
> > java.lang.NullPointerException
> > at
> > org.geotools.filter.CartesianDistanceFilter.contains(CartesianDistanceFilter.java:130)
> > at
> > org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:675)
> > at
> > org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
> > at
> > org.vfny.geoserver.responses.FeatureResponse.getQuery(FeatureResponse.java:252)
> > at
> > org.vfny.geoserver.responses.FeatureResponse.getXmlResponse(FeatureResponse.java:112)
> > at
> > es.pfc.hbarriuso.geoserver.util.WFSServer.getFeature(WFSServer.java:137)
> > at
> > es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.getAttributes(GeoserverSoapBindingImpl.java:33)
> > at
> > es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.main(GeoserverSoapBindingImpl.java:113)
> >
> > The classes es.pfc.* belong to my application. I'm trying to envelope
> > the request and responses of GeoServer within a Web Services framework.
> > So I don' use the servlets, but I instead use the classes of Geoserver
> > and Geotools.
> > I hope this helps to get an answer.
> > Thanks in advance
> >
> >
> > ---Publicidad--------------------------------------------------------
> > Juega con Ventura24.es, lotera inteligente y multiplica tus
> > posibilidades!! http://www.iespana.es/_reloc/email.ventura
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > Does SourceForge.net help you be more productive? Does it
> > help you create better code? SHARE THE LOVE, and help us help
> > YOU! Click Here: http://sourceforge.net/donate/
> > _______________________________________________
> > Geoserver-devel mailing list
> > Geoserver-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
> ---Publicidad--------------------------------------------------------
> Juega con Ventura24.es, lotera inteligente y multiplica tus
> posibilidades!! http://www.iespana.es/_reloc/email.ventura
>

---Publicidad--------------------------------------------------------
Únete a los miles de sin pareja en Meetic... ¡te vas a enamorar!
http://www.iespana.es/_reloc/email.meetic

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--

Chris,

Note that it will no longer be necessary to request the geometry when
using PostGIS with GEOS.

Doug

On Mon, 2003-11-03 at 12:06, Chris Holmes wrote:

Sorry about that. I wasn't on email this weekend to respond, I'm glad you
figured it out without too much grief. It's actually come up on the
mailing list before, but we should put it in a more obvious place. I'm
pretty sure the problem should be fixed in the next release, as Jody
Garnett was dealing with that issue on our latest geotools changes to roll
into geoserver.

  Chris

On Sun, 2 Nov 2003, Hector Hugo Barriuso Mata wrote:

> I have resolved my error.
> When I was querying a set of properties, I didn't ask for the_geom
> property of the DWithin filter, so it couldn't resolve if the feature
> was or not inside the distance I specified.
> Maybe this helps other people.
> Now the query is:
> <GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <Query typeName="ejes">
> <PropertyName>the_geom</PropertyName>
> <PropertyName>codigopost</PropertyName>
> <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <DWithin>
> <PropertyName>the_geom</PropertyName>
> <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
> <gml:coordinates>443454.0,4478531.0</gml:coordinates>
> </gml:Point>
> <Distance
> units="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
> </DWithin>
> </Filter>
> </Query>
> </GetFeature>
> ===========================================
>
> El dom, 02-11-2003 a las 18:17, Doug Cates escribió:
> > try units= instead of unit=
> >
> >
> > On Sun, 2003-11-02 at 04:19, Hector Hugo Barriuso Mata wrote:
> > > <GetFeature xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> > > <Query typeName="ejes">
> > > <PropertyName>codigopost</PropertyName>
> > > <Filter xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> > > <DWithin>
> > > <PropertyName>the_geom</PropertyName>
> > > <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
> > > <gml:coordinates>443454.0,4478531.0</gml:coordinates>
> > > </gml:Point>
> > > <Distance
> > > unit="http://www.uomdict.com/uom.html#meters&quot;&gt;100&lt;/Distance&gt;
> > > </DWithin>
> > > </Filter>
> > > </Query>
> > > </GetFeature>
> > > ===========================================
> > >
> > > The query is this.
> > > I miswrote it the other day because I didn't remember the exact form of
> > > it. When I try to execute this query I get the following exception:
> > >
> > > java.lang.NullPointerException
> > > at
> > > org.geotools.filter.CartesianDistanceFilter.contains(CartesianDistanceFilter.java:130)
> > > at
> > > org.geotools.data.postgis.PostgisDataSource.getFeatures(PostgisDataSource.java:675)
> > > at
> > > org.geotools.data.AbstractDataSource.getFeatures(AbstractDataSource.java:120)
> > > at
> > > org.vfny.geoserver.responses.FeatureResponse.getQuery(FeatureResponse.java:252)
> > > at
> > > org.vfny.geoserver.responses.FeatureResponse.getXmlResponse(FeatureResponse.java:112)
> > > at
> > > es.pfc.hbarriuso.geoserver.util.WFSServer.getFeature(WFSServer.java:137)
> > > at
> > > es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.getAttributes(GeoserverSoapBindingImpl.java:33)
> > > at
> > > es.pfc.hbarriuso.geoserver.GeoserverSoapBindingImpl.main(GeoserverSoapBindingImpl.java:113)
> > >
> > > The classes es.pfc.* belong to my application. I'm trying to envelope
> > > the request and responses of GeoServer within a Web Services framework.
> > > So I don' use the servlets, but I instead use the classes of Geoserver
> > > and Geotools.
> > > I hope this helps to get an answer.
> > > Thanks in advance
> > >
> > >
> > > ---Publicidad--------------------------------------------------------
> > > Juega con Ventura24.es, lotera inteligente y multiplica tus
> > > posibilidades!! http://www.iespana.es/_reloc/email.ventura
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > Does SourceForge.net help you be more productive? Does it
> > > help you create better code? SHARE THE LOVE, and help us help
> > > YOU! Click Here: http://sourceforge.net/donate/
> > > _______________________________________________
> > > Geoserver-devel mailing list
> > > Geoserver-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/geoserver-devel
> >
> >
> > ---Publicidad--------------------------------------------------------
> > Juega con Ventura24.es, lotera inteligente y multiplica tus
> > posibilidades!! http://www.iespana.es/_reloc/email.ventura
> >
>
>
> ---Publicidad--------------------------------------------------------
> Únete a los miles de sin pareja en Meetic... ¡te vas a enamorar!
> http://www.iespana.es/_reloc/email.meetic
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>