Feb 272015
 
  • Is there anything like OGC Property IN list Filter?

    I am converting some CQL filters to OGC, and I’m wondering whether there is something like a propery in list filter in OGC, or the only solution is to combine the PropertyIsEqualTo with an OR filter. I suspect there isn’t, but if you have a nicer solution please share.

  • GeoNetwork not displaying all harvested metadata with Dublin Core schema

    I have a GeoServer 2.6 installed with the CSW plugin. I can make a call to GetRecords using the standard ISO19115/19139 schema and see all of the metadata. My main interest here are keywords that I am manually adding to a layer. When I change the output schema to Dublin Core (outputSchema=http://www.opengis.net/cat/csw/2.0.2), everything looks good… the keyword values all show up as elements. All other metadata is properly populated… abstract, references, description, type, creator, etc etc.

    Using GeoNetwork 2.10.4, I harvest my GeoServer CSW. When I call GetRecords using the ISO schema, everything looks just as it does on GeoServer. All of my metadata is present. However, when I change the output schema to Dublin Core, almost all of the metadata disappears. A single Record element only contains an identifier, date, BoundingBox, and URIs to my WFS and WMS. All of the other metadata has vanished. If I create a brand new metadata record from within GeoNetwork using the Dublin Core template, it shows every dublin core field, regardless if it’s populated or not. My request looks like this:

    geonetwork/srv/eng/csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results&elementSetName=full&outputSchema=http://www.opengis.net/cat/csw/2.0.2&constraintLanguage=CQL_TEXT

    Does anybody have any idea why the GeoNetwork Dublin Core output schema isn’t showing much of the data that does appear in the ISO output schema for my harvested data?

  • Oracle / GeoServer / WFS-T / Openlayers many polygons as one feature

    Newbie question regarding Oracle / GeoServer / WFS-T / Openlayers. I am creating a table that will hold geometry features a user creates/updates. My question is, I would like to have just one record in the table per customer (customerId). Can I create many polygons/points/lines as one feature in OpenLayers and have that go to GeoServer/WFS-T as one feature that then gets written all in one record in the Oracle Table? Currently I have it all running but it is creating one record for each feature.

    One more thing to note, Oracle does allow this by setting the SDO_GTYPE (geometry type) as a MULTIPOLYGON (2007). The questions is how to create multiple features as one record in OpenLayers/ WFS-T / GeoServer. Is there a setting in the Editable Layer I am missing? Thanks.

    Here is my editable layer:

    var saveStrategy = new OpenLayers.Strategy.Save();
    
            customers = new OpenLayers.Layer.Vector("Customers", {
                strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
                projection: new OpenLayers.Projection("EPSG:2236"),
                protocol: new OpenLayers.Protocol.WFS({
                    version: "1.1.0",
                    srsName: "EPSG:2236",
                    url: "http://server01:8085/geoserver/sf/wfs",
                    featurePrefix: "sf",
                    featureType: "customers",
                    featureNS: "http://a.org/layers01",
                    geometryName: "GEOMETRY"
                })
            });
    

    This is the feature added method:

    function FeatureAdded(object)
            {
    
                var added_feature = object.feature;
                added_feature.state = OpenLayers.State.INSERT;
    
                // Setup Customer Id for inserting to one record
                // NOTE: This is not working, it just creates multiple records
                //       with the next id number (seed)
                added_feature.attributes.customerId = 123456;
    
                saveStrategy.save();
    
            }
    

    When I set the strategy to OpenLayers.Strategy.BBOX(), I get multiple records created in the table. (I am looking to create just one MultiPolygon record in the table.) When I set the strategy to OpenLayers.Strategy.Fixed(), I get no client error (fail method for the strategy does not fire), no GeoServer log error and no records written to the table.

    Update # 1

    As requested, here is a sample post request. In this case I created two polygons which I only wanted to be one record, but it created two records in the table:

    <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs
     http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
    <wfs:Insert>
      <feature:CUSTOMERS xmlns:feature="http://a.org/layers01">
        <feature:GEOMETRY>
          <gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:2236">
            <gml:surfaceMember>
              <gml:Polygon>
                <gml:exterior>
                  <gml:LinearRing>
                    <gml:posList>701479.552253 437319.29214775 799997.3100655 437319.29214775 799997.3100655
                                 436384.8351165 701092.880378 436223.72183525 700899.5444405 436771.5069915
                                 701479.552253 437319.29214775
                    </gml:posList>
                  </gml:LinearRing>
                </gml:exterior>
              </gml:Polygon>
            </gml:surfaceMember>
          </gml:MultiSurface>
        </feature:GEOMETRY>
        <feature:CUSTOMERID>123456</feature:CUSTOMERID>
        <feature:LAST_MODIFIED_DATE>2015-02-26</feature:LAST_MODIFIED_DATE>
      </feature:CUSTOMERS>
    </wfs:Insert>
    <wfs:Insert>
      <feature:CUSTOMERS xmlns:feature="http://a.org/layers01">
        <feature:GEOMETRY>
          <gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:2236">
            <gml:surfaceMember>
              <gml:Polygon>
                <gml:exterior>
                  <gml:LinearRing>
                    <gml:posList>701608.442878 435611.4913665 700738.43115925 434805.92496025 701253.99365925
                                 433968.13589775 702059.5600655 434258.139804 701608.442878 435611.4913665
                    </gml:posList>
                  </gml:LinearRing>
                </gml:exterior>
              </gml:Polygon>
            </gml:surfaceMember>
          </gml:MultiSurface>
        </feature:GEOMETRY>
        <feature:CUSTOMERID>123456</feature:CUSTOMERID>
        <feature:LAST_MODIFIED_DATE>2015-02-26</feature:LAST_MODIFIED_DATE>
      </feature:CUSTOMERS>
    </wfs:Insert>
    </wfs:Transaction>
    

Digest powered by RSS Digest

 Posted by at 13:36
%d bloggers like this: