[Geoserver-users] TIGER data SRIDs?

  
Hello, I'm having a bit of trouble with TIGER data. I'm trying to load
and access it using PostGIS, and only doing Maryland at the moment.
I've followed the first three steps on this page (
http://docs.codehaus.org/display/GEOSDOC/Loading+TIGER+data). At this
point, I should be able to view TIGER point and poly landmarks through
the Map Previews demo page, right?

So I added the FeatureType "tiger2006se:point_landmarks", selected
"point" for the style, 4326 for the SRS (Lookup SRS came back
"unknown"), generated a bounding box, submitted, applied, and saved.
The point_landmarks feature shows up in the mini-map previews, but when
I try to view it I get this exception in the console window:

3001250 [INFO] org.vfny.geoserver.servlets.AbstractService - handling
request:

GetMap Request

version: 1.1.1

output format: image/png

width height: 300,800

bbox: Env[-81.059826 : -73.466302, 37.421658 : 40.269229]

layers: openumi:point_landmarks

styles: point

3001297 [SEVERE] org.geotools.data.jdbc.JDBC1DataStore - Error
Performing SQL query: SELECT encode(AsBinary(force_2d("the_geom"),
'XDR'),'base64') FROM "public"."point_landmarks" WHERE "the_geom" &&
GeometryFromText('POLYGON ((-81.1167774337.364706580000004, -81.11677743
40.32618042, -73.40935057 40.32618042, -73.40935057 37.364706580000004,
-81.11677743 37.364706580000004))', 1)

org.postgresql.util.PSQLException: ERROR: Operation on two geometries
with different SRIDs

The query OpenLayers tried to perform is:

http://localhost:8080/geoserver/wms?bbox=-79.69299149999999,37.883403849
99999,-74.83313650000001,39.80748315&styles=&Format=application/openlaye
rs&request=GetMap&layers=openumi:point_landmarks&width=800&height=300&sr
s=EPSG:4326

I don't know anything about SRIDs... is this an error in the database,
or an error in my request? And how do I go about fixing it?

Thanks,

________________________________

Joshua Foster
Sr. Computer Programmer
1627 Spencer Mountain Rd.
Gastonia, NC 28054
(704) 824-0199 x215
(704) 824-0241 Fax

jfoster@anonymised.com
www.dtiweb.net

image001.jpg

image002.gif

My guess is that when you loaded your shapefile to postgis you didn't use the -s flag (I think that's the one). You should do -s 4326 to tell PostGIS to load it in that SRS. The flag may be something else, but it's an optional flag that lets you set the srs. If that's done right then the lookup srs should also work, as long as your postgis table was set up properly, with the spatial reference systems loaded and all.

Chris

Joshua Foster wrote:

Hello, I’m having a bit of trouble with TIGER data. I’m trying to load and access it using PostGIS, and only doing Maryland at the moment. I’ve followed the first three steps on this page (_http://docs.codehaus.org/display/GEOSDOC/Loading+TIGER+data_). At this point, I should be able to view TIGER point and poly landmarks through the Map Previews demo page, right?

So I added the FeatureType “tiger2006se:point_landmarks”, selected “point” for the style, 4326 for the SRS (Lookup SRS came back “unknown”), generated a bounding box, submitted, applied, and saved. The point_landmarks feature shows up in the mini-map previews, but when I try to view it I get this exception in the console window:

3001250 [INFO] org.vfny.geoserver.servlets.AbstractService - handling request:

GetMap Request

version: 1.1.1

output format: image/png

width height: 300,800

bbox: Env[-81.059826 : -73.466302, 37.421658 : 40.269229]

layers: openumi:point_landmarks

styles: point

3001297 [SEVERE] org.geotools.data.jdbc.JDBC1DataStore - Error Performing SQL query: SELECT encode(AsBinary(force_2d("the_geom"), 'XDR'),'base64') FROM "public"."point_landmarks" WHERE "the_geom" && GeometryFromText('POLYGON ((-81.1167774337.364706580000004, -81.11677743 40.32618042, -73.40935057 40.32618042, -73.40935057 37.364706580000004, -81.11677743 37.364706580000004))', 1)

org.postgresql.util.PSQLException: ERROR: Operation on two geometries with different SRIDs

The query OpenLayers tried to perform is:

http://localhost:8080/geoserver/wms?bbox=-79.69299149999999,37.88340384999999,-74.83313650000001,39.80748315&styles=&Format=application/openlayers&request=GetMap&layers=openumi:point_landmarks&width=800&height=300&srs=EPSG:4326

I don’t know anything about SRIDs… is this an error in the database, or an error in my request? And how do I go about fixing it?

Thanks,

------------------------------------------------------------------------

**Joshua Foster***
**Sr. Computer Programmer***
1627 Spencer Mountain Rd.
Gastonia, NC 28054
(704) 824-0199 x215
(704) 824-0241 Fax

jfoster@anonymised.com
www.dtiweb.net

!DSPAM:4005,47178345102331096210785!

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

!DSPAM:4005,47178345102331096210785!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4005,47178345102331096210785!

If this is with ogr2ogr, i'm not sure if I should use -a_srs (assign an
output srs) or -s_srs (override source srs).

So I guess what I need to do is blow away the database, reimport the
data with this flag and go through the "Loading TIGER data" steps again?

Thanks again,
Josh

-----Original Message-----
From: Chris Holmes [mailto:cholmes@anonymised.com]
Sent: Thursday, October 18, 2007 12:16 PM
To: Joshua Foster
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] TIGER data SRIDs?

My guess is that when you loaded your shapefile to postgis you didn't
use the -s flag (I think that's the one). You should do -s 4326 to tell

PostGIS to load it in that SRS. The flag may be something else, but
it's an optional flag that lets you set the srs. If that's done right
then the lookup srs should also work, as long as your postgis table was
set up properly, with the spatial reference systems loaded and all.

Chris

Joshua Foster wrote:

Hello, I'm having a bit of trouble with TIGER data. I'm trying to

load

and access it using PostGIS, and only doing Maryland at the moment.
I've followed the first three steps on this page
(_http://docs.codehaus.org/display/GEOSDOC/Loading+TIGER+data_). At
this point, I should be able to view TIGER point and poly landmarks
through the Map Previews demo page, right?

So I added the FeatureType "tiger2006se:point_landmarks", selected
"point" for the style, 4326 for the SRS (Lookup SRS came back
"unknown"), generated a bounding box, submitted, applied, and saved.
The point_landmarks feature shows up in the mini-map previews, but

when

I try to view it I get this exception in the console window:

3001250 [INFO] org.vfny.geoserver.servlets.AbstractService - handling
request:

GetMap Request

version: 1.1.1

output format: image/png

width height: 300,800

bbox: Env[-81.059826 : -73.466302, 37.421658 : 40.269229]

layers: openumi:point_landmarks

styles: point

3001297 [SEVERE] org.geotools.data.jdbc.JDBC1DataStore - Error
Performing SQL query: SELECT encode(AsBinary(force_2d("the_geom"),
'XDR'),'base64') FROM "public"."point_landmarks" WHERE "the_geom" &&
GeometryFromText('POLYGON ((-81.1167774337.364706580000004,

-81.11677743

40.32618042, -73.40935057 40.32618042, -73.40935057

37.364706580000004,

-81.11677743 37.364706580000004))', 1)

org.postgresql.util.PSQLException: ERROR: Operation on two geometries
with different SRIDs

The query OpenLayers tried to perform is:

http://localhost:8080/geoserver/wms?bbox=-79.69299149999999,37.883403849
99999,-74.83313650000001,39.80748315&styles=&Format=application/openlaye
rs&request=GetMap&layers=openumi:point_landmarks&width=800&height=300&sr
s=EPSG:4326

<http://localhost:8080/geoserver/wms?bbox=-79.69299149999999,37.88340384
999999,-74.83313650000001,39.80748315&styles=&Format=application/openlay
ers&request=GetMap&layers=openumi:point_landmarks&width=800&height=300&s
rs=EPSG:4326>

I don't know anything about SRIDs... is this an error in the database,

or

an error in my request? And how do I go about fixing it?

Thanks,

------------------------------------------------------------------------

**Joshua Foster***
**Sr. Computer Programmer***
1627 Spencer Mountain Rd.
Gastonia, NC 28054
(704) 824-0199 x215
(704) 824-0241 Fax

jfoster@anonymised.com
www.dtiweb.net

!DSPAM:4005,47178345102331096210785!

------------------------------------------------------------------------

------------------------------------------------------------------------
-

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a

browser.

Download your FREE copy of Splunk now >> http://get.splunk.com/

!DSPAM:4005,47178345102331096210785!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4005,47178345102331096210785!

Joshua Foster wrote:

If this is with ogr2ogr, i'm not sure if I should use -a_srs (assign an
output srs) or -s_srs (override source srs).

I think -a_srs should be fine. I feel like tiger data may not come with .prj files. They are 4326 though

So I guess what I need to do is blow away the database, reimport the
data with this flag and go through the "Loading TIGER data" steps again?

If you've already done a bunch of work you could just figure out how to alter your postgis stuff to do 4326. But I'm not exactly sure how to do it, I think you need to change the geometry_columns row, but then also maybe some constraints and all the geometries.

Chris

Thanks again,
Josh

-----Original Message-----
From: Chris Holmes [mailto:cholmes@anonymised.com] Sent: Thursday, October 18, 2007 12:16 PM
To: Joshua Foster
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] TIGER data SRIDs?

My guess is that when you loaded your shapefile to postgis you didn't use the -s flag (I think that's the one). You should do -s 4326 to tell

PostGIS to load it in that SRS. The flag may be something else, but it's an optional flag that lets you set the srs. If that's done right then the lookup srs should also work, as long as your postgis table was set up properly, with the spatial reference systems loaded and all.

Chris

Joshua Foster wrote:

Hello, I'm having a bit of trouble with TIGER data. I'm trying to

load

and access it using PostGIS, and only doing Maryland at the moment. I've followed the first three steps on this page (_http://docs.codehaus.org/display/GEOSDOC/Loading+TIGER+data_). At this point, I should be able to view TIGER point and poly landmarks through the Map Previews demo page, right?

So I added the FeatureType "tiger2006se:point_landmarks", selected "point" for the style, 4326 for the SRS (Lookup SRS came back "unknown"), generated a bounding box, submitted, applied, and saved. The point_landmarks feature shows up in the mini-map previews, but

when

I try to view it I get this exception in the console window:

3001250 [INFO] org.vfny.geoserver.servlets.AbstractService - handling request:

GetMap Request

version: 1.1.1

output format: image/png

width height: 300,800

bbox: Env[-81.059826 : -73.466302, 37.421658 : 40.269229]

layers: openumi:point_landmarks

styles: point

3001297 [SEVERE] org.geotools.data.jdbc.JDBC1DataStore - Error Performing SQL query: SELECT encode(AsBinary(force_2d("the_geom"), 'XDR'),'base64') FROM "public"."point_landmarks" WHERE "the_geom" && GeometryFromText('POLYGON ((-81.1167774337.364706580000004,

-81.11677743

40.32618042, -73.40935057 40.32618042, -73.40935057

37.364706580000004,

-81.11677743 37.364706580000004))', 1)

org.postgresql.util.PSQLException: ERROR: Operation on two geometries with different SRIDs

The query OpenLayers tried to perform is:

http://localhost:8080/geoserver/wms?bbox=-79.69299149999999,37.883403849
99999,-74.83313650000001,39.80748315&styles=&Format=application/openlaye
rs&request=GetMap&layers=openumi:point_landmarks&width=800&height=300&sr
s=EPSG:4326 <http://localhost:8080/geoserver/wms?bbox=-79.69299149999999,37.88340384
999999,-74.83313650000001,39.80748315&styles=&Format=application/openlay
ers&request=GetMap&layers=openumi:point_landmarks&width=800&height=300&s
rs=EPSG:4326>

I don't know anything about SRIDs... is this an error in the database,

or

an error in my request? And how do I go about fixing it?

Thanks,

------------------------------------------------------------------------

  
**Joshua Foster***
**Sr. Computer Programmer***
1627 Spencer Mountain Rd.
Gastonia, NC 28054
(704) 824-0199 x215
(704) 824-0241 Fax

jfoster@anonymised.com
www.dtiweb.net

------------------------------------------------------------------------

------------------------------------------------------------------------
-

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a

browser.

Download your FREE copy of Splunk now >> http://get.splunk.com/

!DSPAM:4005,47178345102331096210785!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4005,47178345102331096210785!

!DSPAM:4005,4717afbd226033327367457!