Skip to content

Commit

Permalink
update shapelib to 1.6.0 (#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteven4 authored Jan 25, 2024
1 parent ad68e02 commit 6081fe4
Show file tree
Hide file tree
Showing 10 changed files with 3,505 additions and 3,965 deletions.
24 changes: 11 additions & 13 deletions shapelib/COPYING → shapelib/LICENSE-LGPL
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]

Preamble
Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Expand Down Expand Up @@ -100,7 +99,7 @@ works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.

GNU LIBRARY GENERAL PUBLIC LICENSE
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library which
Expand Down Expand Up @@ -134,7 +133,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.

1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
Expand Down Expand Up @@ -412,7 +411,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

NO WARRANTY
NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
Expand All @@ -435,9 +434,9 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS

Appendix: How to Apply These Terms to Your New Libraries
How to Apply These Terms to Your New Libraries

If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
Expand All @@ -464,8 +463,8 @@ convey the exclusion of warranty; and each file should have at least the
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Also add information on how to contact you by electronic and paper mail.

Expand All @@ -480,4 +479,3 @@ necessary. Here is a sample; alter the names:
Ty Coon, President of Vice

That's all there is to it!

21 changes: 21 additions & 0 deletions shapelib/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 1999, Frank Warmerdam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion shapelib/README.GPSBabel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a subset of Shapelib v1.5.0 from http://shapelib.maptools.org/
This is a subset of Shapelib v1.6.0 from http://shapelib.maptools.org/

The source is unmodified. It's subsetted here only to reduce
the amount of size in our tree that it takes and to reduce ongoing
Expand Down
46 changes: 23 additions & 23 deletions shapelib/dbf_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ <h2>DBFOpen()</h2>
pszDBFFile: The name of the xBase (.dbf) file to access.

pszAccess: The fopen() style access string. At this time only
"rb" (read-only binary) and "rb+" (read/write binary)
"rb" (read-only binary) and "rb+" (read/write binary)
should be used.
</pre>

The DBFOpen() function should be used to establish access to an existing
xBase format table file. The returned DBFHandle is passed to other
access functions, and DBFClose() should be invoked to recover resources, and
xBase format table file. The returned DBFHandle is passed to other
access functions, and DBFClose() should be invoked to recover resources, and
flush changes to disk when complete. The DBFCreate() function should
called to create new xBase files. As a convenience, DBFOpen() can be
called with the name of a .shp or .shx file, and it will figure out the
Expand All @@ -43,8 +43,8 @@ <h2>DBFCreate()</h2>

pszDBFFile: The name of the xBase (.dbf) file to create.
</pre>
The DBFCreate() function creates a new xBase format file with the given

The DBFCreate() function creates a new xBase format file with the given
name, and returns an access handle that can be used with other DBF functions.
The newly created file will have no fields, and no records. Fields should
be added with DBFAddField() before any records add written.
Expand Down Expand Up @@ -105,19 +105,19 @@ <h2>DBFGetFieldInfo()</h2>
hDBF: The access handle for the file to be queried, as returned by
DBFOpen(), or DBFCreate().

iField: The field to be queried. This should be a number between
iField: The field to be queried. This should be a number between
0 and n-1, where n is the number fields on the file, as
returned by DBFGetFieldCount().

pszFieldName: If this pointer is not NULL the name of the requested field
will be written to this location. The pszFieldName buffer
will be written to this location. The pszFieldName buffer
should be at least 12 character is size in order to hold
the longest possible field name of 11 characters plus a
the longest possible field name of 11 characters plus a
terminating zero character.

pnWidth: If this pointer is not NULL, the width of the requested field
will be returned in the int pointed to by pnWidth. This is
the width in characters.
the width in characters.

pnDecimals: If this pointer is not NULL, the number of decimal places
precision defined for the field will be returned. This is
Expand Down Expand Up @@ -145,7 +145,7 @@ <h2>DBFGetFieldInfo()</h2>
<h2>DBFAddField()</h2>

<pre>
int DBFAddField( DBFHandle hDBF, const char * pszFieldName,
int DBFAddField( DBFHandle hDBF, const char * pszFieldName,
DBFFieldType eType, int nWidth, int nDecimals );

hDBF: The access handle for the file to be updated, as returned by
Expand Down Expand Up @@ -186,7 +186,7 @@ <h2>DBFReadIntegerAttribute()</h2>

<pre>
int DBFReadIntegerAttribute( DBFHandle hDBF, int iShape, int iField );

hDBF: The access handle for the file to be queried, as returned by
DBFOpen(), or DBFCreate().

Expand All @@ -206,7 +206,7 @@ <h2>DBFReadDoubleAttribute()</h2>

<pre>
double DBFReadDoubleAttribute( DBFHandle hDBF, int iShape, int iField );

hDBF: The access handle for the file to be queried, as returned by
DBFOpen(), or DBFCreate().

Expand All @@ -226,7 +226,7 @@ <h2>DBFReadStringAttribute()</h2>

<pre>
const char *DBFReadStringAttribute( DBFHandle hDBF, int iShape, int iField );

hDBF: The access handle for the file to be queried, as returned by
DBFOpen(), or DBFCreate().

Expand All @@ -237,10 +237,10 @@ <h2>DBFReadStringAttribute()</h2>
</pre>

The DBFReadStringAttribute() will read the value of one field and return
it as a string. This function may be used on any field type (including
it as a string. This function may be used on any field type (including
FTInteger and FTDouble) and will return the string representation stored
in the .dbf file. The returned pointer is to an internal buffer
which is only valid untill the next DBF function call. It's contents may
which is only valid until the next DBF function call. It's contents may
be copied with normal string functions such as strcpy(), or strdup(). If
the TRIM_DBF_WHITESPACE macro is defined in shapefil.h (it is by default)
then all leading and trailing space (ASCII 32) characters will be stripped
Expand All @@ -252,7 +252,7 @@ <h2>DBFIsAttributeNULL()</h2>

<pre>
int DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField );

hDBF: The access handle for the file to be queried, as returned by
DBFOpen(), or DBFCreate().

Expand All @@ -265,7 +265,7 @@ <h2>DBFIsAttributeNULL()</h2>
This function will return TRUE if the indicated field is NULL valued
otherwise FALSE. Note that NULL fields are represented in the .dbf file
as having all spaces in the field. Reading NULL fields will result in
a value of 0.0 or an empty string with the other DBFRead*Attribute()
a value of 0.0 or an empty string with the other DBFRead*Attribute()
functions.<p>

<!-------------------------------------------------------------------------->
Expand All @@ -289,7 +289,7 @@ <h2>DBFWriteIntegerAttribute</h2>

The DBFWriteIntegerAttribute() function is used to write a value to a numeric
field (FTInteger, or FTDouble). If the write succeeds the value TRUE will
be returned, otherwise FALSE will be returned. If the value is too large to
be returned, otherwise FALSE will be returned. If the value is too large to
fit in the field, it will be truncated and FALSE returned.<p>

<!-------------------------------------------------------------------------->
Expand All @@ -313,7 +313,7 @@ <h2>DBFWriteDoubleAttribute()</h2>

The DBFWriteDoubleAttribute() function is used to write a value to a numeric
field (FTInteger, or FTDouble). If the write succeeds the value TRUE will
be returned, otherwise FALSE will be returned. If the value is too large to
be returned, otherwise FALSE will be returned. If the value is too large to
fit in the field, it will be truncated and FALSE returned.<p>

<!-------------------------------------------------------------------------->
Expand All @@ -336,8 +336,8 @@ <h2>DBFWriteStringAttribute()</h2>
</pre>

The DBFWriteStringAttribute() function is used to write a value to a string
field (FString). If the write succeeds the value TRUE willbe returned,
otherwise FALSE will be returned. If the value is too large to
field (FString). If the write succeeds the value TRUE willbe returned,
otherwise FALSE will be returned. If the value is too large to
fit in the field, it will be truncated and FALSE returned.<p>

<!-------------------------------------------------------------------------->
Expand All @@ -358,7 +358,7 @@ <h2>DBFWriteNULLAttribute()</h2>

The DBFWriteNULLAttribute() function is used to clear the indicated field
to a NULL value. In the .dbf file this is represented by setting the entire
field to spaces. If the write succeeds the value TRUE willbe returned,
field to spaces. If the write succeeds the value TRUE willbe returned,
otherwise FALSE will be returned.<p>

<!-------------------------------------------------------------------------->
Expand Down Expand Up @@ -414,7 +414,7 @@ <h2>DBFGetNativeFieldType()</h2>

hDBF: The access handle for the file.
iField: The field index to query.

</pre>

This function returns the DBF type code of the indicated field. It will
Expand Down
Loading

0 comments on commit 6081fe4

Please sign in to comment.