Commit 278faeb2 authored by Bas Couwenberg's avatar Bas Couwenberg

Imported Upstream version 0.70

parent 4743c1db
AUTHORS
========
Toshihiro Hiraoka <washitoshi at yahoo.co.jp>
Toshihiro Hiraoka <hiraoka [@at@] azukimap.jp>
maintainer
Petter Reinholdtsen <pere at hungry.com>
Petter Reinholdtsen <pere [@at@] hungry.com>
bug fix, debian package and advices
0.70
======
by Toshihiro Hiraoka
- Applied debian patches.
- Applied Rodney's patch that tracks which didn't have <speed> elements
- Fixed a bug reported by forallsecure. http://www.forallsecure.com/bug-reports/6dd6730b963ea2c4886aee521508d95215f11ab2/
- Supported 1 line gpx.
- Reliability improvement.
- Formated the codes.
0.69
======
by Petter Reinholdsen
- Add configure option "--enable-coverage".
- Add few check targets.
......
......@@ -6,18 +6,32 @@ debian-dist:
dpkg-buildpackage -rfakeroot -d -tc -us -uc
CLEANFILES = \
pinatest2_wpt.shx \
pinatest2_wpt.shp \
pinatest2_wpt.dbf \
pinatest2_trk.shx \
pinatest2_trk.shp \
pinatest2_trk.dbf \
pinatest2_rte.shx \
pinatest2_rte.shp \
pinatest2_meta.txt \
pinatest2_rte.dbf \
pinatest2_meta.txt
pinatest2_rte.shp \
pinatest2_rte.shx \
pinatest2_rte_edg.dbf \
pinatest2_rte_edg.shp \
pinatest2_rte_edg.shx \
pinatest2_rte_pnt.dbf \
pinatest2_rte_pnt.shp \
pinatest2_rte_pnt.shx \
pinatest2_trk.dbf \
pinatest2_trk.shp \
pinatest2_trk.shx \
pinatest2_trk_edg.dbf \
pinatest2_trk_edg.shp \
pinatest2_trk_edg.shx \
pinatest2_trk_pnt.dbf \
pinatest2_trk_pnt.shp \
pinatest2_trk_pnt.shx \
pinatest2_wpt.dbf \
pinatest2_wpt.shp \
pinatest2_wpt.shx
GPX2SHP=src/gpx2shp
$(GPX2SHP):
$(MAKE) -C `dirname $(GPX2SHP)` `basename $(GPX2SHP)`
check: $(GPX2SHP)
$(GPX2SHP) || true
$(GPX2SHP) --version
......
This diff is collapsed.
0.70
======
by Toshihiro Hiraoka
- Applied debian patches.
- Applied Rodney's patch that tracks which didn't have <speed> elements
- Fixed a bug reported by forallsecure. http://www.forallsecure.com/bug-reports/6dd6730b963ea2c4886aee521508d95215f11ab2/
- Supported 1 line gpx.
- Reliability improvement.
- Formated the codes.
0.69
====
by Petter Reinholdtsen
......
......@@ -157,7 +157,7 @@ for attribute table using
Problem or Suggestion
=====================
Please let me know about your opinion in English or Japanese by e-mail.
washitoshi at yahoo.co.jp
hiraoka [@at@] azukimap.jp
http://gpx2shp.sourceforge.jp/
Acknowledgments
......
0.7
Big gpx file support // finish
README // finish
Projection converter
Projection converter // Won't fix
0.8
Windows binary
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(gpx2shp, 0.69, kogame at gmail.com)
AM_INIT_AUTOMAKE(gpx2shp, 0.69)
AC_INIT(gpx2shp, 0.70, hiraoka [@at@] azukimap.jp)
AM_INIT_AUTOMAKE(gpx2shp, 0.70)
AC_CONFIG_SRCDIR(src/main.c)
AM_CONFIG_HEADER(src/config.h)
......
gpx2shp (0.69-5) UNRELEASED; urgency=low
[ Petter Reinholdtsen ]
* Drop Jon Saints from uploader list. His email address no longer
work.
-- Petter Reinholdtsen <pere@debian.org> Fri, 28 Jun 2013 00:12:14 +0200
gpx2shp (0.69-4) unstable; urgency=low
[ Francesco Paolo Lovergine ]
* Fixed watch file.
[ Petter Reinholdtsen ]
* Add Vcs-Browser and Vcs-Svn values to control file.
* Add Homepage URL to control file (Closes: #615423).
* Updated Standards-Version 3.9.4 from 3.7.2.
* Switch to debhelper 8 and dh.
* Build-depend on and use dh_autoreconf to work on
hurd-i386 (Closes: #677941).
-- Petter Reinholdtsen <pere@debian.org> Fri, 28 Jun 2013 00:12:13 +0200
gpx2shp (0.69-3.1) unstable; urgency=low
* Non-maintainer upload.
* Fix "Build-depend on obsolete proj package": build-depend on libproj-dev
instead, thanks to Luca Falavigna.
(Closes: #674761)
-- gregor herrmann <gregoa@debian.org> Mon, 11 Jun 2012 17:19:44 +0200
gpx2shp (0.69-3) unstable; urgency=low
* Added patch: 20_version_0.69.dpatch to fix the ugly program versioning
(closes: #310079)
* Policy bumped to 3.7.2, no changes
* Debhelper compatibility changed to 5 and debian/control updated as consequence
* Added me as Uploader
* Fixed watch file
* Fixed lintian error: debian-rules-ignores-make-clean-error
-- Francesco Paolo Lovergine <frankie@debian.org> Wed, 17 Oct 2007 12:58:07 +0200
gpx2shp (0.69-2) unstable; urgency=low
[ Petter Reinholdtsen ]
* Make package group maintained by the Debian GIS Project.
* Add new co-maintainer Jon Saints as uploader.
* Start using dpatch, and add it to build-depends.
* Move patch to Makefile.am into new patch 10_check_clean.dpatch.
* Increased standard-version from 3.6.1 to 3.6.2 (no changes).
* Updated FSF address in debian/copyright.
[ Paul Wise ]
* Add the homepage to the package description
-- Petter Reinholdtsen <pere@debian.org> Sun, 5 Mar 2006 11:29:12 +0100
gpx2shp (0.69-1) unstable; urgency=low
* New upstream release.
- Fix segfault when only -v is used on the command line (Closes: #292614)
* Patched Makefile.am to make sure 'make check' work out of the box,
and to make sure the files generated by 'make check' are removed on
'make clean'.
-- Petter Reinholdtsen <pere@debian.org> Tue, 22 Feb 2005 08:48:18 +0100
gpx2shp (0.68-1) unstable; urgency=low
* New upstream version.
......
Source: gpx2shp
Section: science
Priority: optional
Maintainer: Petter Reinholdtsen <pere@debian.org>
Build-Depends: debhelper (>= 4.0.0), proj, libexpat1-dev
Standards-Version: 3.6.1
Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
Uploaders: Petter Reinholdtsen <pere@debian.org>, Francesco Paolo Lovergine <frankie@debian.org>
Build-Depends: debhelper (>= 8), dh-autoreconf, dpatch, libproj-dev, libexpat1-dev
Standards-Version: 3.9.4
Homepage: http://gpx2shp.sourceforge.jp
Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-grass/packages/gpx2shp
Vcs-Svn: svn://anonsvn.debian.org/pkg-grass/packages/gpx2shp
Package: gpx2shp
Architecture: any
Depends: ${shlibs:Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: convert GPS or GPX file to ESRI Shape file
Convert GPS or GPX file to ESRI/Shape file. Include the tools
gps2shp and gpx2shp. These are very useful when using collected GPS
points with existing GIS tools like qgis and GRASS.
......@@ -3,7 +3,7 @@ Sun, 12 Dec 2004 17:13:58 +0100.
It was downloaded from <URL:http://sourceforge.jp/projects/gpx2shp/>
Upstream Author: "HIRAOKA, Toshihiro" <washitoshi@yahoo.co.jp>
Upstream Author: "HIRAOKA, Toshihiro" <hiraoka [@at@] azukimap.jp>
License:
......@@ -12,7 +12,7 @@ the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT
gpx2shp is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
......@@ -20,5 +20,5 @@ for more details.
You should have received a copy of the GNU General Public License with
your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with
the Debian GNU/Linux gpx2shp source package as the file COPYING. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111-1307, USA.
write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301, USA.
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make
build: patch-stamp
dh build --with autoreconf
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
clean: unpatch
dh clean --with autoreconf
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
build: build-stamp
build-stamp: config.status
dh_testdir
# Add here commands to compile the package.
$(MAKE) all check
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/gpx2shp.
$(MAKE) install DESTDIR=$(CURDIR)/debian/gpx2shp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installmime
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
%:
dh $@ --with autoreconf
# Example watch control file for uscan
# Rename this file to "watch" and then you can run the "uscan" command
# to check for upstream updates and more.
# Site Directory Pattern Version Script
version=2
http://sourceforge.jp /projects/gpx2shp/files/ gpx2shp-(.*)\.tar\.gz debian uupdate
version=3
http://sourceforge.jp/projects/gpx2shp/releases/ /projects/gpx2shp/downloads/\d+/gpx2shp-([\d\.\-]+)\.tar\.gz
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
......@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
......@@ -21,7 +20,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
......@@ -35,6 +33,22 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = man
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)"
NROFF = nroff
MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
......@@ -84,6 +98,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
......@@ -96,6 +112,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
......@@ -105,30 +122,42 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
man_MANS = gpx2shp.1
EXTRA_DIST = $(man_MANS)
subdir = man
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
NROFF = nroff
MANS = $(man_MANS)
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu man/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
uninstall-info-am:
man1dir = $(mandir)/man1
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(man1dir)
test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
......@@ -147,8 +176,8 @@ install-man1: $(man1_MANS) $(man_MANS)
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
done
uninstall-man1:
@$(NORMAL_UNINSTALL)
......@@ -168,8 +197,8 @@ uninstall-man1:
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
done
tags: TAGS
TAGS:
......@@ -177,10 +206,6 @@ TAGS:
ctags: CTAGS
CTAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
......@@ -194,7 +219,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
......@@ -212,9 +237,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(man1dir)
for dir in "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
......@@ -234,7 +260,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
......@@ -251,6 +277,8 @@ dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
......@@ -286,8 +314,8 @@ uninstall-am: uninstall-info-am uninstall-man
uninstall-man: uninstall-man1
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-man1 install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
......
.\"
.TH "gpx2shp" "1" "0.68" "Toshihiro Hiraoka" ""
.TH "gpx2shp" "1" "0.70" "Toshihiro Hiraoka" ""
.SH "NAME"
gpx2shp \- Convert GPX files to ESRI Shape file
.SH "SYNOPSIS"
......@@ -94,7 +94,7 @@ Petter Reinholdtsen
.SH "BUGS or OPINIONS"
Please e\-mail your bugs or opinions to
.br
washitoshi at yahoo.co.jp
hiraoka [@at@] azukimap.jp
.SH "SEE ALSO"
gpx2shp / gps2shp homepage
......
This diff is collapsed.
......@@ -74,6 +74,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
......
/******************************************************************************
* $Id: dbfopen.c,v 1.1.1.1 2004/11/23 15:04:13 washi Exp $
* $Id: dbfopen.c,v 1.1.1.1 2005/02/23 18:19:53 pagong Exp $
*
* Project: Shapelib
* Purpose: Implementation of .dbf access API documented in dbf_api.html.
......@@ -34,6 +34,9 @@
******************************************************************************
*
* $Log: dbfopen.c,v $
* Revision 1.1.1.1 2005/02/23 18:19:53 pagong
* release 0.69
*
* Revision 1.1.1.1 2004/11/23 15:04:13 washi
* log msg
*
......@@ -542,7 +545,10 @@ void SHPAPI_CALL DBFClose(DBFHandle psDBF)
unsigned char abyFileHeader[32];
fseek(psDBF->fp, 0, 0);
fread(abyFileHeader, 32, 1, psDBF->fp);
if (! fread(abyFileHeader, 32, 1, psDBF->fp) ) {
// do nothing
}
abyFileHeader[1] = 95; /* YY */
abyFileHeader[2] = 7; /* MM */
......@@ -1253,7 +1259,9 @@ DBFWriteAttribute(DBFHandle psDBF, int hEntity, int iField, const void *pValue)
psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
fseek(psDBF->fp, nRecordOffset, 0);
fread(psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp);
if (! fread(psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp)) {
// do nothing
}
psDBF->nCurrentRecord = hEntity;
}
......@@ -1466,7 +1474,10 @@ DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField,
psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
fseek(psDBF->fp, nRecordOffset, 0);
fread(psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp);
if ( ! fread(psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp)) {
// do nothing
}
psDBF->nCurrentRecord = hEntity;
}
......@@ -1662,7 +1673,9 @@ DBFWriteTuple(DBFHandle psDBF, int hEntity, void *pRawTuple)
psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
fseek(psDBF->fp, nRecordOffset, 0);
fread(psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp);
if (! fread(psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp)) {
// do nothing
}
psDBF->nCurrentRecord = hEntity;
}
......@@ -1715,7 +1728,9 @@ const char SHPAPI_CALL1(*) DBFReadTuple(DBFHandle psDBF, int hEntity)
psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
fseek(psDBF->fp, nRecordOffset, 0);
fread(psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp);
if (! fread(psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp)) {
// do nothing
}
psDBF->nCurrentRecord = hEntity;
}
......
This diff is collapsed.
#ifndef lint
static const char SCCSID[] =
"@(#)geod_for.c 4.6 95/09/23 GIE REL";
static const char SCCSID[] = "@(#)geod_for.c 4.6 95/09/23 GIE REL";
#endif
# include "projects.h"
# include "geodesic.h"
# define MERI_TOL 1e-9
static double th1, costh1, sinth1, sina12, cosa12, M, N, c1, c2, D, P, s1;
static int merid, signS;
void geod_pre(void)
{
al12 = adjlon(al12); /* reduce to +- 0-PI */
signS = fabs(al12) > HALFPI ? 1 : 0;
th1 = ellipse ? atan(onef * tan(phi1)) : phi1;
costh1 = cos(th1);
sinth1 = sin(th1);
if ((merid = fabs(sina12 = sin(al12)) < MERI_TOL)) {
sina12 = 0.;
cosa12 = fabs(al12) < HALFPI ? 1. : -1.;
M = 0.;
} else {
cosa12 = cos(al12);
M = costh1 * sina12;
}
N = costh1 * cosa12;
if (ellipse) {
if (merid) {
c1 = 0.;
c2 = f4;
D = 1. - c2;
D *= D;
P = c2 / D;
void geod_pre(void) {
al12 = adjlon(al12); /* reduce to +- 0-PI */
signS = fabs(al12) > HALFPI ? 1 : 0;
th1 = ellipse ? atan(onef * tan(phi1)) : phi1;
costh1 = cos(th1);
sinth1 = sin(th1);
if ((merid = fabs(sina12 = sin(al12)) < MERI_TOL)) {
sina12 = 0.;
cosa12 = fabs(al12) < HALFPI ? 1. : -1.;
M = 0.;
} else {
c1 = geod_f * M;
c2 = f4 * (1. - M * M);
D = (1. - c2) * (1. - c2 - c1 * M);
P = (1. + .5 * c1 * M) * c2 / D;
cosa12 = cos(al12);
M = costh1 * sina12;
}
N = costh1 * cosa12;
if (ellipse) {
if (merid) {
c1 = 0.;
c2 = f4;
D = 1. - c2;
D *= D;
P = c2 / D;
} else {
c1 = geod_f * M;
c2 = f4 * (1. - M * M);
D = (1. - c2) * (1. - c2 - c1 * M);
P = (1. + .5 * c1 * M) * c2 / D;
}
}
if (merid)
s1 = HALFPI - th1;
else {
s1 = (fabs(M) >= 1.) ? 0. : acos(M);
s1 = sinth1 / sin(s1);
s1 = (fabs(s1) >= 1.) ? 0. : acos(s1);
}
}
if (merid)
s1 = HALFPI - th1;
else {
s1 = (fabs(M) >= 1.) ? 0. : acos(M);
s1 = sinth1 / sin(s1);
s1 = (fabs(s1) >= 1.) ? 0. : acos(s1);
}
}
void geod_for(void)
{
double d, sind, u, V, X, ds, cosds, sinds, ss = 0, de;
void geod_for(void) {
double d, sind, u, V, X, ds, cosds, sinds, ss = 0, de;
if (ellipse) {
d = geod_S / (D * geod_a);
if (signS)
d = -d;
u = 2. * (s1 - d);
V = cos(u + d);