[mapserver-users] HOWTO Split Large SHP Files
Vic Kelson
vic@wittmanhydro.com
15 Mar 2002 13:54:55 -0500
--=-ecDPWlFq/2tn/ZqYQmFJ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Folks,
I wrote a Python script that splits a shapefile into pieces, using
pyshapelib. It was a snap, about 15 lines of code. I'll try to locate
the code and pass it along...
Vic.
On Fri, 2002-03-15 at 09:27, Stephen Woodbridge wrote:
Luca,
I don't think there is a general tool to do that, but if you know C it
is pretty easy to use shplib to write utility to read the shape file and
dump specific records to different files. You can also do this using
Perl and the XBase and shplib addins.
Why do you want to split the file?
performance? have you tried building a shptree index?
-Steve W.
Luca Pescatore wrote:
>
> Where i can find "How To Split Large SHP Files" in to small files ?
>
> Is it available an How To ? I can't din it on Wiki.
>
> Best Regards,
> Luca Pescatore
--=-ecDPWlFq/2tn/ZqYQmFJ
Content-Type: text/html; charset=utf-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/1.0.1">
</HEAD>
<BODY>
Folks,
<BR>
<BR>
I wrote a Python script that splits a shapefile into pieces, using pyshapelib. It was a snap, about 15 lines of code. I'll try to locate the code and pass it along...
<BR>
<BR>
Vic.
<BR>
<BR>
On Fri, 2002-03-15 at 09:27, Stephen Woodbridge wrote:
<BLOCKQUOTE>
<PRE><FONT COLOR="#737373"><FONT SIZE="3"><I>Luca,</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>I don't think there is a general tool to do that, but if you know C it</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>is pretty easy to use shplib to write utility to read the shape file and</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>dump specific records to different files. You can also do this using</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Perl and the XBase and shplib addins.</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Why do you want to split the file?</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>performance? have you tried building a shptree index?</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>-Steve W.</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Luca Pescatore wrote:</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>> Where i can find "How To Split Large SHP Files" in to small files ?</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>> Is it available an How To ? I can't din it on Wiki.</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>> Best Regards,</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>> Luca Pescatore</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-ecDPWlFq/2tn/ZqYQmFJ--