WFS layer with "location"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

WFS layer with "location"

geseus
Hi,

Im using Geoserver and PostGis ..

On database i have table
I also have  materialized view, wich is updated periodically:


If I create a layer /"geoCoordinate-1"/ via /"Configure new SQL view..."/
and use this select:


Then, when i check /DescribeFeatureType:
http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&version=1.1.0&typeName=lge:geoCoordinate-1/

the result is:


BUT, if I create a layer /"geoCoordinate-2"/ via /"Configure new SQL
view..."/ and use this select:

NOTE: i just changed word /"point"/ to the word /"location"/ in the select.

Then the result of DescribeFeatureType:
/http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&version=1.1.0&typeName=lge:geoCoordinate-2/
is:


Element /"location"/ is missing in the schema. But when I use /GetFeature/
request, the /locations/ are correctly in the result.
Why does it happen? Is the /"location"/ some keyword? Is it possible to use
word /"location"/ somehow as a column name of the select (and the element of
the layer)?

Thanks a lot,
Tomas



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: WFS layer with "location"

Ian Turton
Unfortunately Nabble has eaten all the important bits of your message, can you join the mailing list and use a normal mail client to send your question.

This will also mean that you see the answers and it is an important first step on becoming a member of the community.

Ian

On Wed, 10 Apr 2019 at 06:14, geseus <[hidden email]> wrote:
Hi,

Im using Geoserver and PostGis ..

On database i have table
I also haveĀ  materialized view, wich is updated periodically:


If I create a layer /"geoCoordinate-1"/ via /"Configure new SQL view..."/
and use this select:


Then, when i check /DescribeFeatureType:
http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&version=1.1.0&typeName=lge:geoCoordinate-1/

the result is:


BUT, if I create a layer /"geoCoordinate-2"/ via /"Configure new SQL
view..."/ and use this select:

NOTE: i just changed word /"point"/ to the word /"location"/ in the select.

Then the result of DescribeFeatureType:
/http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&version=1.1.0&typeName=lge:geoCoordinate-2/
is:


Element /"location"/ is missing in the schema. But when I use /GetFeature/
request, the /locations/ are correctly in the result.
Why does it happen? Is the /"location"/ some keyword? Is it possible to use
word /"location"/ somehow as a column name of the select (and the element of
the layer)?

Thanks a lot,
Tomas



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


--
Ian Turton


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: WFS layer with "location"

geseus
Hi, thanks for reply .. so once again without formatting ..

Hi,

Im using Geoserver and PostGis ..

On database i have table "Coordinate" ("Id", "X", "Y", "AddressId",
"RootId", ...)
I also have  materialized view, wich is updated periodically:

create materialized view "geoCoordinate"
select "RootId", "AddressId", "Location" as "Location-3067",
st_transform("Location", 4326) as "Location-4326"
from (
select "Id", "RootId", "AddressId", st_setsrid(st_point("X", "Y"),
3067)::geometry(Point,3067) as "Location"
from "Coordinate") t
with data;

If I create a layer "geoCoordinate-1" via "Configure new SQL view..." and
use this select:

select "AddressId" as "addressId", "RootId" as "rootId", "Location-4326" as
"point"
from "geoCoordinate"

Then, when i check DescribeFeatureType:
http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&version=1.1.0&typeName=lge:geoCoordinate-1

the result is:

<xsd:schema elementFormDefault="qualified"
targetNamespace="http://test-namespace.fi/lge">
  <xsd:import namespace="http://www.opengis.net/gml"
schemaLocation="http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd"/>
  <xsd:complexType name="geoCoordinate-1Type">
    <xsd:complexContent>
    <xsd:extension base="gml:AbstractFeatureType">
      <xsd:sequence>
        <xsd:element maxOccurs="1" minOccurs="0" name="addressId"
nillable="true" type="xsd:string"/>
        <xsd:element maxOccurs="1" minOccurs="0" name="rootId"
nillable="true" type="xsd:string"/>
        <xsd:element maxOccurs="1" minOccurs="0" name="point"
nillable="true" type="gml:PointPropertyType"/>
      </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="geoCoordinate-1" substitutionGroup="gml:_Feature"
type="lge:geoCoordinate-1Type"/>
</xsd:schema>


BUT, if I create a layer "geoCoordinate-2" via "Configure new SQL view..."
and use this select:

select "AddressId" as "addressId", "RootId" as "rootId", "Location-4326" as
"location"
from "geoCoordinate"
NOTE: i just changed word "point" to the word "location"

Then the result of DescribeFeatureType:
http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&version=1.1.0&typeName=lge:geoCoordinate-2
is:

<xsd:schema elementFormDefault="qualified"
targetNamespace="http://test-namespace.fi/lge">
  <xsd:import namespace="http://www.opengis.net/gml"
schemaLocation="http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd"/>
  <xsd:complexType name="geoCoordinate-2Type">
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractFeatureType">
        <xsd:sequence>
          <xsd:element maxOccurs="1" minOccurs="0" name="addressId"
nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="rootId"
nillable="true" type="xsd:string"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="geoCoordinate-2" substitutionGroup="gml:_Feature"
type="lge:geoCoordinate-2Type"/>
</xsd:schema>

Element "location" is missing schema. But when I use GetFeature request, the
"locations" are correctly shown in the result.

Why does it happen? Is the "location" some keyword? Is it possible to use
word "location" somehow as a column name of the select (and the element of
the layer)?

Thanks a lot,
Tomas
 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users