[mapserver-users] Shapefile Modification
Keith Baker
krbaker@metacarta.com
04 Nov 2002 16:09:37 -0500
--=-J4e+aI4tSvE75HY9ZDV/
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
I was thinking about doing this with the perl shapelib bindings if I
couldn't find anyone with a tool. Its a pretty simple task which would
make a great utility.
Say I have shapefile with polygons (the us for example)
Then I have another shapefile which has a bunch of lines. (say from all
of north america)
I want to remove all lines within the polygons (US), (ideally) trim the
lines crossing the boundry, keep others...
Here is my issue... I have all of vmap0 in shapefile. I want to trim
out the US data that I have duplicated from tiger data. (roads, lakes,
etc)
What do you think?
On Mon, 2002-11-04 at 15:55, Frank Warmerdam wrote:
> Keith Baker wrote:
> > Humm... All suggestions turned out negitive.
> >=20
> > ogr2ogr can remove things based on extent, but not based on another
> > shapefile. I may go hack away at it... not sure yet. Seems like
> > something someone must have done. I don't want to have to purchase
> > ArcView for this project if I can avoid it.
>=20
> Keith,
>=20
> I have been developing Python bindings for OGR. If you are willing to pu=
t
> up with some hassles, we could look at doing your filtering/changes as a
> python script using OGR. I have only been skimming this thread so you
> might need to repeat to me what you are wanting to do, but in general
> an aweful lot should be possible with OGR/Python.
>=20
> Best regards,
>=20
> --=20
> ---------------------------------------+---------------------------------=
-----
> I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox=
.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
>=20
>=20
>=20
--=-J4e+aI4tSvE75HY9ZDV/
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA9xuIRyzx89uXZKRERAiPWAJ4rZqTs5c+IfCnUidz7yz5qiLoRPwCgtWTb
3l7l9+UL79R3GOf1Kk9ee+s=
=8lIe
-----END PGP SIGNATURE-----
--=-J4e+aI4tSvE75HY9ZDV/--