[postgis-users] Newbie postgis application question

Kevin Murphy murphy2 at speakeasy.net
Sat Aug 3 21:24:59 PDT 2002


Wow, Paul, thanks a lot.  I had just found the transform() function but it 
would have taken me a while to put all the pieces together.  

One question: what if I want to create a map that crosses state boundaries?
Will there be odd discontinuities?  

Thanks,
Kevin

On Saturday 03 August 2002 11:55 pm, Paul Ramsey wrote:
> OK, a real quicky.
> First, make sure you've uploaded the spatial_ref_sys.sql file.
> Now, do an "update yourtable set thegeom=setsrid(thegeom,4269)"
> This tells the system that all your geometries are in NAD83 LL.
> Now, read through your /usr/local/share/proj/epsg file (you have
> installed proj4 right? if not, do so, then recompile postgis w/ proj4
> support).
> Find the stateplane projection number for the state you want to map.
> Search for the state name in the file, and find the NAD83 stateplane
> variant. They are almost always 'lcc' projections. For example, numbers
> 32148 and 32149 are the stateplane definitions for Washington state.
> Stateplane defs are the classic planar projections for US county and
> state areas. They tend to result in nice 'normal' looking maps for small
> regional areas. Then you can create a new table which has reprojected
> geometries in it. Like:
>
> select transform(thegeom,32148),road_name,address_num into planartable
> from statetable where county = 'King County' and state = 'Washington'
>
> Enjoy,
> P.
>
> Kevin Murphy wrote:
> > I have a little mapping project that I'd like some advice on.  Let me
> > tell you that I know nothing about GIS and mapping except what I've
> > learned from snooping around the net in my spare time in the last few
> > days.  Basically what I need to know is how to convert NAD83
> > longitude/latitude coordinates via some sort of projection into
> > coordinates that will look reasonable when mapped at the scale of, say
> > several counties, or an entire state.  I can program in C and Perl, I
> > have Linux, I have PostgreSQL and PostGIS successfully installed.  I have
> > used Postgres before.   I have downloaded the census bureau's
> > cartographic boundary files for US counties and written a couple Perl
> > programs to manipulate the raw data in text format. I wrote a program to
> > create maps in Postscript using the data and realized from the distortion
> > that I need to transform the coordinates via a projection.
> >





More information about the postgis-users mailing list