[Geoserver-users] Filtered SQL SERVER requests from GeoServer

I have setup a SQL SERVER 2008 datastore in Geoserver 2.5 but fail to get any
filtered requests back from GeoServer. I have tried POST & GET WFS requests
from OpenLayers. Trying WFS 1.0.0 and 1.1.0 but to no avail.

Fixed strategy requests work well but no BBOX request returns any features.

http://developer.system-ns.net:8080/geoserver/MobileSurvey/ows?request=GetFeature&service=WFS&version=1.1.0&typeName=CATASTRO_POINTS

Will try to test a PostGIS connection next but need get this working in SQL
Server in order to deploy to Windows Azure.

Cheers,
Dennis

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Filtered-SQL-SERVER-requests-from-GeoServer-tp5134223.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I just got this running with MapServer. WFS 1.0.0 / 1.1.0, GET / POST, Fixed
/ BBOX are all OK with MapServer using the same SQL Server data source as in
my GeoServer setup. Still would like to know why this isn't working with
GeoServer. I was always under the impression that GeoServer is more advanced
than MapServer. Plus, I like the web GUI.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-WFS-requests-tp5134223p5134470.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I am issuing the following wmsfeaturerequest

var info = new OpenLayers.Control.WMSGetFeatureInfo({
                url: 'http://gistest:8080/geoserver/Geostore/wms’,
                output: 'features',
                infoFormat: 'application/gml+xml',
                format: new OpenLayers.Format.GML,

                eventListeners: {
                    getfeatureinfo: function (event) {
                        console.log(event);
                        console.log(event.features);
                        console.log(event.text);
                    }
                }
            })

            map.addControl(info);
            info.activate();
It fails and the console tells me its apermissions issue (I think)

SEC7119: XMLHttpRequest for http://gistest:8080/geoserver/Geostore/wms?LAYERS=Geostore%3ABUS_STOPS,Geostore%3AWards04_region,Geostore%3ATOPOGRAPHICAREA,mastermap&QUERY_LAYERS=Geostore%3ABUS_STOPS,Geostore%3AWards04_region,Geostore%3ATOPOGRAPHICAREA,mastermap&STYLES=,,OS_TopoArea,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=346822.277897%2C391326.238218%2C346865.80146%2C391369.761782&FEATURE_COUNT=10&HEIGHT=798&WIDTH=798&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fgml%2Bxml&SRS=EPSG%3A27700&X=24&Y=132 required CORS preflight.
localhost:51416

SEC7120: Origin http://localhost:51416 not found in Access-Control-Allow-Origin header.
localhost:51416
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

How do I add my local windows7 pc (http://localhost:51416) to the Access-Control-Allow-Origin header. - the server is a windows server 2008 machine
Mark

This e-mail and any attachments are confidential. It may contain privileged information and is intended for the named recipient(s) only. It must not be distributed without consent. If you are not one of the intended recipients, please notify the sender immediately and do not disclose, distribute, or retain this email or any part of it and do not take any action based on it.

Unless expressly stated, opinions in this email are those of the individual sender, and not of Knowsley MBC. Legally binding obligations can only be created for, or be entered into on behalf of, Knowsley MBC by duly authorised officers or representatives.

Knowsley MBC excludes any liability whatsoever for any offence caused, any direct or consequential loss arising from the use, or reliance on, this e-mail or its contents. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking and no responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. Knowsley MBC reserves the right to monitor and/or record all e-mail communications through its network in accordance with relevant legislation.

The issue was caused by Cadcorp SIS not setting an SRID in the Geometry.
Should have thought about this before.

update tablename set geom.STSrid = 3857;

Thanks to SSA who pointed this out on the related StackOverflow post.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-WFS-requests-tp5134223p5135452.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi

I am trying to find the best way to show a legend in an openlayers map using the GetLegendGraphic facility

I am then putting the url below in an image tag but I don't get any text

http://gistest:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=25&HEIGHT=25&LAYER=Geostore:Wards

Using one of the sld examples with topps :states and that has text

http://gistest:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=topp:states

the text is coming from the <Title>&lt; test</Title> tag

but when I add one to my sld I get no text

Can anyone shed aany light or maybe suggest a better way to get a legend from geoserver onto an openlayers map

PS - I also tried using the css legend in the layouts folder but didn't get anywhere with that either

Below is my sld:-

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld&quot; xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:xlink="http://www.w3.org/1999/xlink&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:gml="http://www.opengis.net/gml&quot;
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd&quot;&gt;
  <NamedLayer>
    <Name>Polygon with styled label</Name>
    <UserStyle>
      <Title>SLD Cook Book: Polygon with styled label</Title>
      <FeatureTypeStyle>
        <Rule>
        <Title>&lt; test title</Title>

          <PolygonSymbolizer>

            <Stroke>
              <CssParameter name="stroke">#800000</CssParameter>
              <CssParameter name="stroke-width">3</CssParameter>
            </Stroke>
          </PolygonSymbolizer>
          <TextSymbolizer>
            <Label>
              <ogc:PropertyName>WardName</ogc:PropertyName>
            </Label>
            <Halo>
              <Radius>3</Radius>
              <Fill>
                <CssParameter name="fill">#FFFFFF</CssParameter>
              </Fill>
            </Halo>

            <Font>
              <CssParameter name="font-family">Comic Sans MS</CssParameter>
              <CssParameter name="font-size">11</CssParameter>
              <CssParameter name="font-style">normal</CssParameter>
              <CssParameter name="font-weight">bold</CssParameter>
            </Font>
            <LabelPlacement>
              <PointPlacement>
                <AnchorPoint>
                  <AnchorPointX>0.5</AnchorPointX>
                  <AnchorPointY>0.5</AnchorPointY>
                </AnchorPoint>
              </PointPlacement>
            </LabelPlacement>
            <Fill>
              <CssParameter name="fill">#000000</CssParameter>
            </Fill>
            <VendorOption name="autoWrap">60</VendorOption>
            <VendorOption name="maxDisplacement">150</VendorOption>
          </TextSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>
This e-mail and any attachments are confidential. It may contain privileged information and is intended for the named recipient(s) only. It must not be distributed without consent. If you are not one of the intended recipients, please notify the sender immediately and do not disclose, distribute, or retain this email or any part of it and do not take any action based on it.

Unless expressly stated, opinions in this email are those of the individual sender, and not of Knowsley MBC. Legally binding obligations can only be created for, or be entered into on behalf of, Knowsley MBC by duly authorised officers or representatives.

Knowsley MBC excludes any liability whatsoever for any offence caused, any direct or consequential loss arising from the use, or reliance on, this e-mail or its contents. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking and no responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. Knowsley MBC reserves the right to monitor and/or record all e-mail communications through its network in accordance with relevant legislation.

Hi

I am trying to find the best way to show a legend in an openlayers map using the GetLegendGraphic facility

I am then putting the url below in an image tag but I don't get any text

http://gistest:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=25&HEIGHT=25&LAYER=Geostore:Wards

Using one of the sld examples with topps :states and that has text

http://gistest:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=topp:states

the text is coming from the <Title>&lt; test</Title> tag

but when I add one to my sld I get no text

Can anyone shed aany light or maybe suggest a better way to get a legend from geoserver onto an openlayers map

PS - I also tried using the css legend in the layouts folder but didn't get anywhere with that either

Below is my sld:-

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld&quot; xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:xlink="http://www.w3.org/1999/xlink&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:gml="http://www.opengis.net/gml&quot;
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd&quot;&gt;
  <NamedLayer>
    <Name>Polygon with styled label</Name>
    <UserStyle>
      <Title>SLD Cook Book: Polygon with styled label</Title>
      <FeatureTypeStyle>
        <Rule>
        <Title>&lt; test title</Title>

          <PolygonSymbolizer>

            <Stroke>
              <CssParameter name="stroke">#800000</CssParameter>
              <CssParameter name="stroke-width">3</CssParameter>
            </Stroke>
          </PolygonSymbolizer>
          <TextSymbolizer>
            <Label>
              <ogc:PropertyName>WardName</ogc:PropertyName>
            </Label>
            <Halo>
              <Radius>3</Radius>
              <Fill>
                <CssParameter name="fill">#FFFFFF</CssParameter>
              </Fill>
            </Halo>

            <Font>
              <CssParameter name="font-family">Comic Sans MS</CssParameter>
              <CssParameter name="font-size">11</CssParameter>
              <CssParameter name="font-style">normal</CssParameter>
              <CssParameter name="font-weight">bold</CssParameter>
            </Font>
            <LabelPlacement>
              <PointPlacement>
                <AnchorPoint>
                  <AnchorPointX>0.5</AnchorPointX>
                  <AnchorPointY>0.5</AnchorPointY>
                </AnchorPoint>
              </PointPlacement>
            </LabelPlacement>
            <Fill>
              <CssParameter name="fill">#000000</CssParameter>
            </Fill>
            <VendorOption name="autoWrap">60</VendorOption>
            <VendorOption name="maxDisplacement">150</VendorOption>
          </TextSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>
This e-mail and any attachments are confidential. It may contain privileged information and is intended for the named recipient(s) only. It must not be distributed without consent. If you are not one of the intended recipients, please notify the sender immediately and do not disclose, distribute, or retain this email or any part of it and do not take any action based on it.

Unless expressly stated, opinions in this email are those of the individual sender, and not of Knowsley MBC. Legally binding obligations can only be created for, or be entered into on behalf of, Knowsley MBC by duly authorised officers or representatives.

Knowsley MBC excludes any liability whatsoever for any offence caused, any direct or consequential loss arising from the use, or reliance on, this e-mail or its contents. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking and no responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. Knowsley MBC reserves the right to monitor and/or record all e-mail communications through its network in accordance with relevant legislation.