[Geoserver-users] Problem with Geoserver, PostGIS data, 900913 projection?

I have installed GeoServer 1.6.4 and have LINESTRING data in a a
Postgres/PostGIS database.

I added the database to GeoServer and confirmed that the data is active and
the map is available. On the OpenLayers map test page, it works beautifully
with the generated code below. (Making requests with the BBOX in lat/long
format.)

            tiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Tiled",
"http://localhost:8080/geoserver/wms",
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png',
                    tiled: 'true',
                    tilesOrigin : "42.14712219238278,-88.12725982666012"
                },
                {buffer: 0}
            );
            
            // setup single tiled layer
            untiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Untiled",
"http://localhost:8080/geoserver/wms",
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png'
                },
                {singleTile: true, ratio: 1}
            );

For the OpenLayers demo, the topp:states tiles work in the default code. But
trying to add my Layer above to the demo has been a total failure. All I
ever get returned from the wms is blank tiles. Trying to work without
OpenLayers (using the various JS scripts out there to do a custom map
overlay on Google Maps) has also been a total failure--again, only blank
tiles are received.

I am very new to this, and concerned that perhaps I have somehow
misconfigured my datasource so that it does not work with the 900913
projection? I am looking for any suggestions here, I have been pounding my
head against a brick wall with this.

Thanks,
DHall

--
View this message in context: http://www.nabble.com/Problem-with-Geoserver%2C-PostGIS-data%2C-900913-projection--tp18642192p18642192.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I had a similar problem. I had to ensure that the geometry_columns entry for the table had the correct SRID as well as the geometries stored in the table. Hope this helps. David

DHall wrote:

I have installed GeoServer 1.6.4 and have LINESTRING data in a a
Postgres/PostGIS database.

I added the database to GeoServer and confirmed that the data is active and
the map is available. On the OpenLayers map test page, it works beautifully
with the generated code below. (Making requests with the BBOX in lat/long
format.)

            tiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Tiled",
"http://localhost:8080/geoserver/wms",
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png',
                    tiled: 'true',
                    tilesOrigin : "42.14712219238278,-88.12725982666012"
                },
                {buffer: 0} );
                        // setup single tiled layer
            untiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Untiled",
"http://localhost:8080/geoserver/wms",
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png'
                },
                {singleTile: true, ratio: 1} );

For the OpenLayers demo, the topp:states tiles work in the default code. But
trying to add my Layer above to the demo has been a total failure. All I
ever get returned from the wms is blank tiles. Trying to work without
OpenLayers (using the various JS scripts out there to do a custom map
overlay on Google Maps) has also been a total failure--again, only blank
tiles are received.

I am very new to this, and concerned that perhaps I have somehow
misconfigured my datasource so that it does not work with the 900913
projection? I am looking for any suggestions here, I have been pounding my
head against a brick wall with this.

Thanks,
DHall

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@anonymised.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited. If you have received this communication in error, please notify us immediately.

I had hoped it would be so easy a solution, but the SRID for my table is set
to 4326 in geometry_columns.

DHall

DavidRobison wrote:

I had a similar problem. I had to ensure that the geometry_columns entry
for the table had the correct SRID as well as the geometries stored in
the table. Hope this helps. David

DHall wrote:

I have installed GeoServer 1.6.4 and have LINESTRING data in a a
Postgres/PostGIS database.

I added the database to GeoServer and confirmed that the data is active
and
the map is available. On the OpenLayers map test page, it works
beautifully
with the generated code below. (Making requests with the BBOX in
lat/long
format.)

            tiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Tiled",
"http://localhost:8080/geoserver/wms",
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png',
                    tiled: 'true',
                    tilesOrigin : "42.14712219238278,-88.12725982666012"
                },
                {buffer: 0}
            );
            
            // setup single tiled layer
            untiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Untiled",
"http://localhost:8080/geoserver/wms",
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png'
                },
                {singleTile: true, ratio: 1}
            );

For the OpenLayers demo, the topp:states tiles work in the default code.
But
trying to add my Layer above to the demo has been a total failure. All I
ever get returned from the wms is blank tiles. Trying to work without
OpenLayers (using the various JS scripts out there to do a custom map
overlay on Google Maps) has also been a total failure--again, only blank
tiles are received.

I am very new to this, and concerned that perhaps I have somehow
misconfigured my datasource so that it does not work with the 900913
projection? I am looking for any suggestions here, I have been pounding
my
head against a brick wall with this.

Thanks,
DHall

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@anonymised.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain
confidential and/or privileged material intended solely for the individual
or entity to which it is addressed. If you are not the intended
recipient, you should immediately stop reading this message and delete it
from all computers that it resides on. Any unauthorized reading,
distribution, copying or other use of this communication (or its
attachments) is strictly prohibited. If you have received this
communication in error, please notify us immediately.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Problem-with-Geoserver%2C-PostGIS-data%2C-900913-projection--tp18642192p18653498.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I also had to make sure that when I inserted the records into the table that the geometry has the SRID explicitly set to 4326. By default it was going in as (-1). David

DHall wrote:

···
-- 

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: [drrobison@anonymised.com](mailto:drrobison@anonymised.com)
web: [http://openroadsconsulting.com](http://openroadsconsulting.com)
blog: [http://therobe.blogspot.com](http://therobe.blogspot.com)
book: [http://www.xulonpress.com/book_detail.php?id=2579](http://www.xulonpress.com/book_detail.php?id=2579)

This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.  If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited.  If you have received this communication in error, please notify us immediately.  

 

Try http://localhost:8080/geoserver/wms/reflect?layers=lake:segments_geom&srs=EPSG:900913 ?

and also check the geoserver logs, in the <data directory>/logs ?

-Arne

DHall wrote:

I had hoped it would be so easy a solution, but the SRID for my table is set
to 4326 in geometry_columns.

DHall

DavidRobison wrote:
  

I had a similar problem. I had to ensure that the geometry_columns entry for the table had the correct SRID as well as the geometries stored in the table. Hope this helps. David

DHall wrote:
    

I have installed GeoServer 1.6.4 and have LINESTRING data in a a
Postgres/PostGIS database.

I added the database to GeoServer and confirmed that the data is active
and
the map is available. On the OpenLayers map test page, it works
beautifully
with the generated code below. (Making requests with the BBOX in
lat/long
format.)

            tiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Tiled",
"http://localhost:8080/geoserver/wms&quot;,
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png',
                    tiled: 'true',
                    tilesOrigin : "42.14712219238278,-88.12725982666012"
                },
                {buffer: 0} );
                        // setup single tiled layer
            untiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Untiled",
"http://localhost:8080/geoserver/wms&quot;,
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png'
                },
                {singleTile: true, ratio: 1} );

For the OpenLayers demo, the topp:states tiles work in the default code.
But
trying to add my Layer above to the demo has been a total failure. All I
ever get returned from the wms is blank tiles. Trying to work without
OpenLayers (using the various JS scripts out there to do a custom map
overlay on Google Maps) has also been a total failure--again, only blank
tiles are received.

I am very new to this, and concerned that perhaps I have somehow
misconfigured my datasource so that it does not work with the 900913
projection? I am looking for any suggestions here, I have been pounding
my
head against a brick wall with this.

Thanks,
DHall

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@anonymised.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain
confidential and/or privileged material intended solely for the individual
or entity to which it is addressed. If you are not the intended
recipient, you should immediately stop reading this message and delete it
from all computers that it resides on. Any unauthorized reading,
distribution, copying or other use of this communication (or its
attachments) is strictly prohibited. If you have received this
communication in error, please notify us immediately.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

That URL did return something for me--it shows me my line segments returned
in a 17px by 549px image, so stretched out vertically.

In the request.log, I see the various GET requests, no errors.

DHall

Arne Kepp-2 wrote:

Try
http://localhost:8080/geoserver/wms/reflect?layers=lake:segments_geom&srs=EPSG:900913
?

and also check the geoserver logs, in the <data directory>/logs ?

-Arne

DHall wrote:

I had hoped it would be so easy a solution, but the SRID for my table is
set
to 4326 in geometry_columns.

DHall

DavidRobison wrote:
  

I had a similar problem. I had to ensure that the geometry_columns entry
for the table had the correct SRID as well as the geometries stored in
the table. Hope this helps. David

DHall wrote:
    

I have installed GeoServer 1.6.4 and have LINESTRING data in a a
Postgres/PostGIS database.

I added the database to GeoServer and confirmed that the data is active
and
the map is available. On the OpenLayers map test page, it works
beautifully
with the generated code below. (Making requests with the BBOX in
lat/long
format.)

            tiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Tiled",
"http://localhost:8080/geoserver/wms&quot;,
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png',
                    tiled: 'true',
                    tilesOrigin :
"42.14712219238278,-88.12725982666012"
                },
                {buffer: 0}
            );
            
            // setup single tiled layer
            untiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Untiled",
"http://localhost:8080/geoserver/wms&quot;,
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png'
                },
                {singleTile: true, ratio: 1}
            );

For the OpenLayers demo, the topp:states tiles work in the default
code.
But
trying to add my Layer above to the demo has been a total failure. All
I
ever get returned from the wms is blank tiles. Trying to work without
OpenLayers (using the various JS scripts out there to do a custom map
overlay on Google Maps) has also been a total failure--again, only
blank
tiles are received.

I am very new to this, and concerned that perhaps I have somehow
misconfigured my datasource so that it does not work with the 900913
projection? I am looking for any suggestions here, I have been
pounding
my
head against a brick wall with this.

Thanks,
DHall

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@anonymised.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain
confidential and/or privileged material intended solely for the
individual
or entity to which it is addressed. If you are not the intended
recipient, you should immediately stop reading this message and delete
it
from all computers that it resides on. Any unauthorized reading,
distribution, copying or other use of this communication (or its
attachments) is strictly prohibited. If you have received this
communication in error, please notify us immediately.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Problem-with-Geoserver%2C-PostGIS-data%2C-900913-projection--tp18642192p18653781.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

So then your layer is probably reprojecting correctly (EPSG:900913 does stretch things quite a bit).

Your problem appears to be the way you configure your JavaScript client. You can append &format=application/openlayers to the URL below to get a sample client in EPSG:900913. If you look at the requests it sends to the backend (use something like firebug) and compare that to what the client you have made does, you may be able to figure it out.

Note that OpenLayers default to 4326, so you should define the projection on the Map object and similarly for all layers you add to this map.

-Arne

DHall wrote:

That URL did return something for me--it shows me my line segments returned
in a 17px by 549px image, so stretched out vertically.

In the request.log, I see the various GET requests, no errors.

DHall

Arne Kepp-2 wrote:
  

Try http://localhost:8080/geoserver/wms/reflect?layers=lake:segments_geom&srs=EPSG:900913 ?

and also check the geoserver logs, in the <data directory>/logs ?

-Arne

DHall wrote:
    

I had hoped it would be so easy a solution, but the SRID for my table is
set
to 4326 in geometry_columns.

DHall

DavidRobison wrote:
  

I had a similar problem. I had to ensure that the geometry_columns entry for the table had the correct SRID as well as the geometries stored in the table. Hope this helps. David

DHall wrote:
    

I have installed GeoServer 1.6.4 and have LINESTRING data in a a
Postgres/PostGIS database.

I added the database to GeoServer and confirmed that the data is active
and
the map is available. On the OpenLayers map test page, it works
beautifully
with the generated code below. (Making requests with the BBOX in
lat/long
format.)

            tiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Tiled",
"http://localhost:8080/geoserver/wms&quot;,
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png',
                    tiled: 'true',
                    tilesOrigin :
"42.14712219238278,-88.12725982666012"
                },
                {buffer: 0} );
                        // setup single tiled layer
            untiled = new OpenLayers.Layer.WMS(
                "lake:segments_geom - Untiled",
"http://localhost:8080/geoserver/wms&quot;,
                {
                    srs: 'EPSG:4326',
                    width: '529',
                    styles: '',
                    height: '550',
                    layers: 'lake:segments_geom',
                    format: 'image/png'
                },
                {singleTile: true, ratio: 1} );

For the OpenLayers demo, the topp:states tiles work in the default
code.
But
trying to add my Layer above to the demo has been a total failure. All
I
ever get returned from the wms is blank tiles. Trying to work without
OpenLayers (using the various JS scripts out there to do a custom map
overlay on Google Maps) has also been a total failure--again, only
blank
tiles are received.

I am very new to this, and concerned that perhaps I have somehow
misconfigured my datasource so that it does not work with the 900913
projection? I am looking for any suggestions here, I have been
pounding
my
head against a brick wall with this.

Thanks,
DHall

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@anonymised.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

This e-mail communication (including any attachments) may contain
confidential and/or privileged material intended solely for the
individual
or entity to which it is addressed. If you are not the intended
recipient, you should immediately stop reading this message and delete
it
from all computers that it resides on. Any unauthorized reading,
distribution, copying or other use of this communication (or its
attachments) is strictly prohibited. If you have received this
communication in error, please notify us immediately.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users