Skip to content

Commit

Permalink
Rev A
Browse files Browse the repository at this point in the history
Issue for reivew
  • Loading branch information
omni360 committed Apr 1, 2014
1 parent 531c0b3 commit 9c5ef3c
Show file tree
Hide file tree
Showing 42 changed files with 23,358 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

DGNLIB_OBJ = dgnfloat.o dgnhelp.o dgnread.o dgnwrite.o \
dgnopen.o dgnstroke.o
CPLLIB_OBJ = cpl_conv.o cpl_dir.o cpl_error.o cpl_multiproc.o \
cpl_path.o cpl_string.o cpl_vsil_simple.o cpl_vsisimple.o

OBJ = $(CPLLIB_OBJ) $(DGNLIB_OBJ)

default: dgndump dgnwritetest

dgndump: dgndump.c $(OBJ)
$(CXX) dgndump.c $(OBJ) -o dgndump

dgnwritetest: dgnwritetest.c $(OBJ)
$(CXX) dgndump.c $(OBJ) -o dgnwritetest

clean:
rm -f *.o dgndump dgnwritetest
27 changes: 27 additions & 0 deletions Makefile.vc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

DGNLIB_OBJ = dgnfloat.obj dgnhelp.obj dgnread.obj dgnwrite.obj \
dgnopen.obj dgnstroke.obj
CPLLIB_OBJ = cpl_conv.obj cpl_dir.obj cpl_error.obj cpl_multiproc.obj \
cpl_path.obj cpl_string.obj cpl_vsil_simple.obj \
cpl_vsisimple.obj

OBJ = $(CPLLIB_OBJ) $(DGNLIB_OBJ)

CPPFLAGS = /EHsc

default: wininclude dgndump.exe dgnwritetest.exe dgnlib.dll

dgndump.exe: dgndump.c $(OBJ)
$(CXX) dgndump.c $(OBJ)

dgnwritetest.exe: dgnwritetest.c $(OBJ)
$(CXX) dgnwritetest.c $(OBJ)

dgnlib.dll: $(OBJ)
link /dll /debug $(OBJ) /out:dgnlib.dll /implib:dgnlib_i.lib

wininclude:
copy cpl_config.h.vc cpl_config.h

clean:
del *.lib *.dll *.exe *.obj
209 changes: 209 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@

DGNLIB Source Distribution
==========================

Current information on DGNLIB, including detailed API documentation
can be found at:

http://dgnlib.maptools.org/


Building
--------

This is a preliminary source distribution, and I have not gone to any
pains to make it easy to configure and build. To build please do the
following:

== Unix:

1. Update cpl_config.h to represent your platform accurately. Generally all
that matters is to #define WORDS_BIGENDIAN on big endian platforms. The
rest can likely be ignored.<p>

2. Build the programs.

% make

== Windows:

1. Ensure you have Microsoft Visual C++ 6.x or later installed.

2. Ensure the commandline VC++ environment is setup properly. You may need
to run the VCVARS32.BAT script from within the VC++ tree.

3. Compile the code, and build statically linked executables for the sample
programs and DLL using the following command.

nmake /f makefile.vc



Release Notes
=============

Release 1.11
------------

o B-Spline support:
- The DGNT_BSPLINE define was bogus, replaced with DGNT_BSPLINE_POLE.
- Added support for the following B-Spline related elements:
o DGNElemBSplineSurfaceHeader (24)
o DGNElemBSplineCurveHeader (27)
o DGNElemBSplineSurfaceBoundary (25)
o DGNElemKnotWeight (26/28)

o Added initial support for Shared Cell Definition elements

o 3D solid/surface fixes:
- Fixed incorrect reading and writing of surftype field.
- Added boundelms field to DGNElemComplexHeader
- Added DGNCreateSolidHeaderElem() and DGNCreateSolidHeaderElemFromGroup()
- Changed DGNCreateComplexHeaderElem() and
DGNCreateComplexHeaderElemFromGroup() to only support complex chains/shapes
- Fixed bug creating solids/surfaces: totlength was 1 word too short.
- Renamed bogus define DGNSUT_SOLID to DGNSUT_SURFACE_OF_PROJECTION

o Added support for cloning Cone elements

o Fixes for uor handling in DGNCreate().

o Treat the most recently read color table as the global color table,
instead of just the first one encountered.

o Added Text Node implementation from Ilya Beylin.


Release 1.10
------------

o Added DGNElemTypeHasDispHdr(), and use it in DGNParseCore() to avoid trying
to read disp hdr, or attributes from inappropriate elements.

o Check if a negative amount of attribute information is being read in
DGNParseCore(), and if so just issue a warning, and skip attempt.

o Fixed DGNCreateCellHeaderFromGroup() to not pre-transform the bounds.

o Fixed missing handling of min/max Z in DGNCreateMultiPointElem(). (Marius)

o Added surface type to DGNCreateComplexHeaderElem(). (Marius)

o DGNRad50ToAscii() reimplemented to correct a few problems. New version
provided by Armin Berg (iez.com).

o Fixes to complex header and cell header creation to set the total group
size properly, and to set up complex header pad attributes properly. Now
passed EDG validation.


Release 1.9
-----------

o Added DGNLoadTCB(), and fixed problem when writing new elements to an
existing file without having already read the TCB.

o Fixed serious bug in setting the index "offset" location. Critical for
writing applications.


Release 1.8
-----------

o Added support for reading 3D cone (23), 3D surface (18) and 3D solid (19)
elements based on contributions from Marius Kintel.

o Main site moved to http://dgnlib.maptools.org/


Release 1.7
-----------

o Improved calcuation of bounding box in DGLCreateTextElem() based on code
from Matt Kelder.

o Added preliminary 3D write support.

o Modified DGNCreateTextElem() arguments, and deprecated DGNCreateArcElem2D()
in favour of DGNCreateArcElem().

o Report transformation matrix for ViewInfo when dumping.


Release 1.6
-----------

o Bug fix in DGNGetLinkage() for DMRS recognition from Henk Jan Priester.

o Added DGNCreateCellHeaderFromGroup() and DGNCreateCellHeaderElem()
functions in the write API.

o Added a Microsoft VC++ makefile (Makefile.vc).


Release 1.5
-----------

o Added 2D write support!

o Fixed collection of background color in color table (color 255) as per
bug report by Henk Jan Priester (Justcroft Technical Systems).

o Added support for association ids (DGNLT_ASSOC_ID, DGNGetAssocID()).

o Fixed problem with updating the DGNInfo.color_table field when a color
table is read.

o Fixed problem with spatial queries either including all of a complex
element (and it's members) or none.

o Added support for reading the eight view descriptions in the TCB element.

o Added a Makefile in the source distribution.

o Fixed error with tags in DGNFreeElement() as reported by Henk Jan Priester.



Release 1.4
-----------

o Added "fast" spatial searching via the DGNSetSpatialFilter() function.
This basically just reads the extents information at beginning of
geometric features to see if they should be returned.

o Actually extract the global origin from the TCB, and use it when
transforming points. Only a few files (ie. Brazos County roads.rds) use
a non-zero origin.

o Added experimental multi byte text support from Ason Kang
([email protected]).

o Add experimental support for 3D files. Somes 3d elements not supported.
3d quaterion for ellipse and arc elements not utilized.

o Added preliminary support for reading cell header structures based
on input from Mike Cane.

o Moved a bunch of stuff into dgnread.cpp.

o Build default colortable into dgnhelp.cpp for use of DGNLookupColor().

o Added DGNGetShapeFillInfo().

o DGNGetShapeFillInfo() now tries to handle multi-part attribute linkages.


Release 1.3
-----------

o Added raw_data/raw_bytes members of DGNElemCore, and DGNSetOptions()
to allow control of when raw element image is retained.

o Added -r flag to dgndump to dump raw contents of desired elements.

o Add CPL_CVSID() to simplify tracking of versions.

o Fixed bug with freeing element index in DGNClose().


86 changes: 86 additions & 0 deletions cpl_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT

/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_SNPRINTF 1
#define vsnprintf _vsnprintf
#define snprintf _snprintf

/* Define to 1 if you have the `copysign' function. */
#define HAVE_COPYSIGN
#define copysign _copysign
#define copysignf _copysign
#define copysignl _copysign

/* Define if you have the ANSI C header files. */
#ifndef STDC_HEADERS
# define STDC_HEADERS
#endif

/* Define to 1 if you have the <assert.h> header file. */
#define HAVE_ASSERT_H 1

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

#undef HAVE_LIBDL

/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1

#define HAVE_FLOAT_H 1

#define HAVE_ERRNO_H 1

/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R

#undef HAVE_DLFCN_H
#undef HAVE_DBMALLOC_H
#undef HAVE_LIBDBMALLOC
#undef WORDS_BIGENDIAN

#define HAVE_SEARCH_H

/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4

/* The size of a `long', as computed by sizeof. */
#define SIZEOF_LONG 4

/* Set the native cpu bit order */
#define HOST_FILLORDER FILLORDER_LSB2MSB

/* Define as 0 or 1 according to the floating point format suported by the
machine */
#define HAVE_IEEEFP 1

/* What to use to force variables to be threadlocal */
/* #define CPL_THREADLOCAL __declspec(thread) */

/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
# ifndef inline
# define inline __inline
# endif
#endif

#define lfind _lfind

#pragma warning(disable: 4786)

/* #define CPL_DISABLE_DLL */

Loading

0 comments on commit 9c5ef3c

Please sign in to comment.