社区
C语言
帖子详情
open project显示unexpected end of file on,为什么?
hx123qaz
2001-09-04 03:50:29
我现在新建test1.prj,内容如下:
test1.cpp
test2.cpp
保存为test1.prj后,open project时,屏幕显示unexpected end of file on错误,这是什么意思?
我用的是bc++31
...全文
49
回复
打赏
收藏
open project显示unexpected end of file on,为什么?
我现在新建test1.prj,内容如下: test1.cpp test2.cpp 保存为test1.prj后,open project时,屏幕显示unexpected end of file on错误,这是什么意思? 我用的是bc++31
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
VclZip pro v3.10.1
VCLZip Native Delphi Zip/UnZip Component! (VCLZip Lite: Version 2.23 April 14th, 2002) (VCLZip Pro: Version 3.10 Buid 1 - November 25th, 2007) IMPORTANT: If installing the registered version, please be sure to always re-install/rebuild the components (VCLZip and VCLUnZip) to the component pallette (or rebuild the design time package) so that the ThisVersion property and any other new properties will be properly updated. If your application still does not run without the IDE,
open
up VCLZip's package, click on options and look at the Directories/Conditionals tab. If KPDEMO is defined, remove it and recompile the package. ***IMPORTANT: Please remember do not install these components into a package by the name of either VCLZip or VCLUnZip. You will receive an error if you do. PLEASE TAKE A LOOK AT THE "WHAT's NEW IN THIS VERSION" LINK IN THE HELP
FILE
AS IT HAS CONVENIENT LINKS TO ALL OF THE NEW TOPICS. ==================== Version 3.10 Build 1 - Several bug fixes. - Added support for Delphi 2006, 2007 - Added support for BCB 2006, 2007 - Improved memory performance when working with archives containing extremely high number of compressed
file
s. ==================== Version 3.06 Build 2 Made Delphi 2005 compatible Other assorted fixes ==================== Version 3.05 Build 1 Fixed a lot of incompatabilities between VCLZip and WinZip Other assorted fixes ==================== Version 3.04 Build 1 New ZLib methods for optimized compression and decompression of single entities of data in standard ZLib format, without the overhead of the PKZip format. This is excellent for compression of data to be sent across the net, compressing web pages (http compliant compression), blobs, etc. - ZLibCompressStream - ZLibDecompressStream - ZLibCompressBuffer - ZLibDecompressBuffer - ZLibCompressString - ZLibDecompressString Overloaded TStream Methods for Delphi 4,5, BCB 4, and 5 - UnZipToStream - UnZipToStreamByIndex - ZipFromStream Special OnGetNextTStream Event for Delphi 4,5, BCB 4, and 5 - Allows zipping multiple TStreams in one process - More efficient than calling ZipFromStream multiple times Capability to use the latest version of ZLib 1.2.1. - VCLZip currently uses 1.4.1 by default. - By defining ZLIB121, VCLZip will use the latest version of ZLib which is included with the registered version. Some optimization improvements which should show some improvement in zipping and unzipping speed when using TkpStreams with D4, D5, BCB4, and BCB5. ============ Version 3.03 (VCLZip Pro) - Please test your application thoroughly with this new version of VCLZip Pro. While it has been tested and has even been used in at least two production applications for several months now prior to initial release, there are so many combinations of property settings, environment differences, and ways to use VCLZip that you should always test VCLZip completely in your application before deploying. *** New Zip64 capabilities, properties, methods and events: - Uncompressed, Compressed, and Archive
file
sizes can be up to 2^63-1 bytes in length. - You can compress up to 2147483647
file
s into an archive. This is compatible with PKZip's Zip64 format. - If a
file
does not ext
end
beyond any of the original limitations (
file
sizes of 4 gig or 65535
file
s) then no Zip64 format information is included in the archive. - property isZip64 - tells you when you are working with a zip
file
that is using Zip64 format. Much faster processing due to linking to Zlib object
file
s for compression and decompression routines. Blocked Zip
File
s (spanned zip archives split onto hard drive) - Now completely compatible with PKZip and WinZip split archives
file
naming format. - For backwards compatability you can tell VCLZip to use the old VCLZip
file
naming format by using the BlockMode property. - New method On
File
NameForSplitPart called just before each split
file
part is created. VCLZip supplies a default implementation of this method so for most purposes you won't need your own. - method Default
File
NameForSplitPart - VCLZip calls this internally if you don't define your own On
File
NameForSplitPart. You can also call it from your own On
File
NameForSplitPart if you wish to add some processing to the default behavior. - property BlockMode - determines whether VCLZip uses PKZip/WinZip standard naming convention or VCLZip classic method. - method DefaultGetNextDisk - VCLZip calls this internally if you don't define your own OnGetNextDisk. You can also call it from your own OnGetNextDisk event if you wish to add some processing to the default behavior. - Properties for controlling which
file
s are zipped... - IncludeHidden
File
s - default False; - IncludeSys
File
s: - default False; - IncludeReadOnly
File
s: - default True; - IncludeArchive
File
s: - default True; - Event OnGetNextStream - Allows you to zip from multiple streams when using the ZipFromStream method. This improves performance since repeated calls to ZipFromStream causes the archive to be updated on each subsequent call. - property ThisBuild - Tells you the current build. See also ThisVersion - property OnHandleMessage - Handles interactive messages with VCLZip. There is a default, so you don't need to define your own unless you wish to eliminate interactive messages and handle them on your own. This is helpful if you are using VCLZip as a service or on a webserver for instance. ******** Upgrading existing applications that use VCLZip 2.X ********** For the most part, existing applications will work as-is. Just install VCLZip 3.X and recompile your code. Here are some things to be aware of though... 1) If your app currently creates mmBlock archives (spanned directly to hard drive) and you define your own OnGetNextDisk in VCLZip 2.X, you should move your code from this event that handles mmBlock events to the new event On
File
NameForSplitPart. However, if you simply rely on VCLZip's default OnGetNextDisk then you don't have to worry about this. 2) If your app creates mmBlock archives, the default naming convention has changed to match the PKZip/WinZip standard. If you wish to keep the same naming convention then set BlockMode := mbClassic. 3) OnGetNextDisk and OnPrepareNextDisk events are called for the 1st disk now. VCLZip 2.X only calls these events starting with the 2nd disk. 4) properties CompressedSize[Index], UncompressedSize[Index], ZipSize are now Int64 types. 5) Delphi 4, Delphi 5, BCB 4, and BCB5 are all capable of using the Zip64 format. However they use the TkpHugeStream dec
end
ants which act just like TStreams except they handle
file
s/stream sizes larger than 2gig. There is a TkpHuge
File
Stream and a TkpHugeMemoryStream which should handle 99% of all necessary actions. If you currently work with VCLZip 2.X with TBlobStreams or some other type of streams, you can either define your own TkpBlobStream for instance which inherits from TkpHugeStream, or use the TkpHugeStream.CopyFrom(TStream, Count) and the TkpHugeStream.GetStream: TStream methods to give VCLZip your stream and get it back. Ofcourse when using regular TStream dec
end
ants in D4,4,BCB4,and 5, you cannot create Zip64 archives. If you use Delphi 6, 7, or BCB 6, you don't have to worry about any of this as the normal TSTream is used by VCLZip and handles large
file
/stream sizes. ============ Version 2.23 (VCLZip Lite) Added the OEMConvert property.
File
names stored in a PKZip compatible archive normally go through an OEM conversion to make them ascii compatible. When
open
ing the zip
file
the conversion is undone. If you do not plan on having other zip utilities
open
ing up your archives this conversion process is not really necessary. Setting this property to False will eliminate this process. The default value for this property is True for normal PKZip compatability. Added OnEncrypt and OnDecrypt events. These allow you to replace the standard pkzip encryption with your own. Data is passed to these events a buffer at a time. Use this with care as this is still somewhat experimental and I'm not sure how useful it is yet. You must make all changes within the buffer sent in to you. Treat the entire
file
as a stream. Byte for byte replacement only. No additional keys can be saved. Added OnRecursing
File
event. Sometimes when using wildcards and recursing directories, there was no reporting of progress. This will be fired each time a
file
matches as the
file
list is being built while recursing directories. Added the EncryptBeforeCompress boolean property. The default for this property is False and if left like this VCLZip will behave like normal. If set to True, VCLZip will encrypt each buffer prior to compressing it instead of afterwards. This will cause
file
s to not be decryptable by normal zip utilities thereby adding a bit of extra security. Bugs Fixed: IMPORTANT!!! Behavior of freeing the ArchiveStream (compressed stream) has been modified. VCLZip will now no longer try to free ArchiveStream, you must free it yourself. This was due to a problem where it would be freed automatically if there was a problem with the ArchiveStream when trying to
open
it as a zip
file
(possibly corrupt). Best practice is that ArchiveStream should always point toward a TMemoryStream that you create anyway. Modified the SFX code (the code used to create the SFX stub distributed with VCLZip) so that it handles
file
names that have been run through an OEM Conversion. The SFX was losing accented characters. This modification means that if you are creating zip
file
s to be used as SFX's you will want to leave the OEMConvert property mentioned above, set to it's default value of True. Modified so that when cursor is changed to hourglass by VCLZip, previous cursor is saved correctly instead of just changing it back to default cursor. Now saves Central Directory Extra Fields correctly. Fixed the SFX code so that it works properly if you use Copy /B to concatenate a zip
file
to the stub. Due to a Delphi strange behavior sometimes path names for directory only entries would become corrupted. Removed reference to QConsts, replaced with RTLConsts. Sometimes a GPF would result if a corrupt zip
file
was
open
ed. Using a wildcard in pathname added to
File
sList did not work. Using '*.*' as a wildcard in
file
s added to
File
sList now is the same as using '*'. VCLZip will now check for CancelTheOperation during initial building of the
file
slist instead of just during compression processing. Added a final call to OnTotalPercentDone with 100% because this didn't always happen. Attributes were not getting set correctly for directory-only entries. Fixed a problem that was not allowing ZipComment's to be added correctly to spanned or blocked zip
file
s. Not the same fix as in 2.22. Directories (directory-only entries) were not being restored properly unless DoAll was True. You were unable to delete a directory from which
file
s were recursively zipped until exiting your application. ============ Version 2.22 Now Delphi 6 compatible. New event called {link=93,OnRecursing
File
} which gets called as VCLZip recurses directories searching for
file
s that match a wildcard that is entered in the
File
sList. This gets called each time a
file
matches the wildcard. Fixed a bug which kept diskettes from being labeled when creating spanned zip
file
s on WIN31. Fixed a bug which sometimes did not allow zip comments to be added to blocked zip sets. Fixed a bug which caused VCLZip to not properly handle the IncompleteZip exception on spanned zip sets unless you called ReadZip prior to calling UnZip. Version 2.21 (Changes are shown in the build stages as they were implemented) Pre-Release Build 5: When working with temporary
file
s, VCLZip will now rename, instead of copy, the temp
file
if the destination is on the same drive. This will speed up the adding of
file
s to an existing zip
file
when the resulting zip
file
is very large. Pre-Release Build 4: New event called OnPrepareNextDisk which is an event that will allow you, when creating spanned zip
file
s across diskettes, to do things like format a diskette that has just been inserted, or to add or delete
file
s from the diskette before continuing with the zipping process. Fixed a problem that was causing the CancelTheOperation Method to not work properly. Pre-Release Build 3: Fixed bug which caused VCLZip to miscalculate space needed for zfc
file
if wildcards are put into the
File
sList. Fixed bug so you could have
File
PercentDone without needing TotalPercentDone when creating spanned zip
file
s Fixed so relative_offset set correctly for spanned zips. Side effect of removing needless write of header. Added code to read local
file
headers if exception thrown when reading a central
file
header. Fixed problem where directories couldn't be created from directory entries because the fullpath wasn't known yet. Result of having moved this code to earlier. Fixed typo in creation of LOC header values which could cause error if reading local headers. Changed so Zip Comment starting position is calculated based on
end
of central record instead of
end
of
file
. Pre-Release Build 2: IMPORTANT: Changed default for
File
Open
Mode back to fmShareDenyNone as it had been for all but version 2.20. Fixed a problem where drivepart (i.e. C:\) was not being stripped when saving relative paths. Added a BufferedStreamSize property which can increase the speed of creating zips to floppy (and other slow media) dramatically. The new default for this should increase the speed by as much as 3 times, but you can now tweak this especially for your application! Added an ImproperZip property which gets set when VCLZip detects an inconsistency with the zip. This can be useful for detecting when VCLZip was able to
open
the zip in spite of an inconsistency found. There was no way to know this in the past. Fixed a problem where zip comments in zfc
file
s were not being read correctly. Added a setZipSignatures procedure which allows you to modify the signatures of your zip
file
. This will cause other zip utilities to not be able to recognize or read your zip
file
s created with VCLZip. Useful if you want to add further security to your zip
file
s. Pre-Release Build 1: Some zip
file
s would not
open
correctly, throwing an incomplete zip
file
exception due to an erroneous "extra field length" identifier in headers of some compressed
file
s. These zip
file
s are rare, but a very few people seemed to have several of them. This problem would not affect zip
file
s created by VCLZip, and this problem should only occur in VCLZip 2.20, not in any previous version. If you had Range Checking turned on, VCLZip would get a range check error when using a wildcard that
end
ed with a * as in 'some
file
.*'. Under certain circumstances, drive information would not be stripped from path information if zipping recursively (including subdirectories) "Retrying" to zip a
file
that could not be
open
ed using the OnSkipping
File
event would not always work correctly. Creating spanned zip set to floppy should be faster now due to removing a needless header write to disk for each
file
. VCLZip would not compile correctly with MAKESMALL defined. Added code to make VCLZip work with BCB5. Haven't tested this yet though since I don't have BCB5 myself yet. Added readonly boolean ImproperZip property which will be set to True when some sort of problem is found when
open
ing the zip
file
, even if recoverable. This property will be enhanced and refined in the future. If KeepZip
Open
is set to True, when putting in the wrong disk in a spanned zip set, VCLZip would not always properly close the
file
on the old diskette before trying to
open
the
file
on the next diskette. Added ECantWriteUCF exception which will be thrown if VCLZip runs out of room to write the uncompressed
file
when unzipping. Timestamp was not being set properly when unzipping readonly
file
s. Moved setting of the timestamp to before the attributes get set. ============ Version 2.20 Changes have been made in the following areas: --Performance There are a few code optimizations that should speed up the zipping process slightly. --Spanned Zip
File
s A new feature, turned on with the SaveZipInfoOnFirstDisk allows VCLZip to create and read spanned zip
file
s starting with the first disk instead of the normally required last disk of the spanned disk set by saving a Zip Configuration
File
on the first disk. This feature can be used even if creating the spanned zip
file
directly to your hard drive. A new property, SaveOnFirstDisk, allows you to save room on the first disk when creating a spanned zip
file
, to allow room for other
file
s, such as setup programs, data
file
s, or a Zip Configuration
File
. Spanned zip
file
s can now be directed toward disks greater than 2 gig in size as long as you are using Delphi 5 or BCB 4. --UnZipping The new Selected indexed property offers another way to flag
file
s to be unzipped.
File
s that have the Selected property set to True can be unzipped using the UnZipSelected method. The Selected property will be cleared (set to False) for each
file
as it is unzipped, but you can also call the ClearSelected method to clear them all. At anytime the NumSelected property can be checked to see how many
file
s have been selected. Also, the UnZipToBufferByIndex and UnZipToStreamByIndex methods allow you to unzip
file
s specified by their index instead of by name or wildcard. The BufferLength property allows buffered output (buffer smaller than the total uncompressed
file
size) when unzipping directly to memory (see UnZipToBuffer and UnZipToBufferByIndex). This will cause the OnGetNextBuffer Event to be called everytime BufferLength bytes have been output by VCLZip. Modified to work in all ways with zip
file
s that have "extra fields" in their headers. These t
end
to be quite rare, but they do show up from time to time. --Zipping Added a property called
File
Open
Mode which allows you to define the
file
open
mode for
file
s when they are
open
ed to be zipped. Added a Retry parameter to the OnSkipping
File
Event that can be used to re-attempt to
open
a
file
for zipping that is
open
by another process. This gives the chance to close the
file
and continue with the zipping process rather than having to start over again. Added a ENotEnoughRoom exception which will be thrown if there is not enough room to write to the archive, i.e. out of disk space. The new OnUpdate Event gets fired when updating or freshening an existing archive. It is triggered for each
file
that already exists in the archive as it is either replaced or kept in the updated archive. The AddDirEntriesOnRecurse will cause separate directory entries to be included in archives when doing recursive zips through subdirectories. --Integrity Checking A new method, CheckArchive, will perform an integrity check on all
file
s in an archive. This is much faster than using
File
IsOK on each
file
if testing all
file
s in an archive with VERY MANY
file
s. Further improved checking for corrupted zip
file
s when
open
ing zip
file
s. --Encryption The following new properties and methods allow lower level work with password encrypted archives: DecryptHeader Gets the decryption header for a particular compressed
file
in an archive GetDecryptHeaderPtr Same as DecryptHeader but easier to use in BCB. DecryptHeaderByte Method Tests a password against the decryption header found in the DecryptHeader property. GetDecryptHeaderByteByPtr Same as DecryptHeaderByte but easier to use in BCB. --Self Extracting Executables Changes were made to the ZIPSFX32.BIN stub itself: - Modified to work with zip
file
s containing "extra fields" in their headers. - Modified to change mouse cursor to an hour glass during processing. - Check for correct
file
size is now done automatically - Now uses the
end
of central and central headers to find the first local header. - Added a progress meter - Better checking for corrupted zip
file
s. - Added an information window that can optionally be shown when the sfx is initially started up. - Added an AutoRun option to make the sfx stub run automatially when double clicked with no other interaction from the user. For the new modified sfx stub, ZIPSFX32.BIN, instead of using kpSFXOpt, you should now use the TSfxConfig component to set the options for the sfx stub. The new sfx can be found in the sfx\ subdirectory as usual and is called ZIPSFX32.BIN and the original sfx can be found in the same subdirectory except it is now called ORGSFX32.bin. Just rename it if you prefer that one (use KPSFXOPT instead of TSfxConfig with the old stub). --Miscellaneous The installation is now easier, atleast for first time installers of the source code. The .DPK
file
s for Delphi and .CPP
file
s for BCB are now included. Now these
file
s simply have to be compiled and that's it. There is a separate option in the installation for installing to the different versions of Delphi and BCB. Added a property called Flush
File
sOnClose which will cause all
file
s
open
ed for write by VCLZip to have their disk buffers flushed to disk when closed. Added the capability to delete Selected
file
s from an archive using the DeleteEntries Method. The behavior of the OnInCompleteZip Event has been greatly improved. You can now use this event to ask the user to insert the last disk of a spanned disk set rather than having to handle this situation from outside VCLZip. The register procedures were changed so that the components now get installed to the "VCLZip" tab on the palette. I found that for all but Delphi 1 I had to actually manually move the components to the "VCLZip" tab. You may find that you have to do this too if you have already installed VCLZip before. The components now use new bitmaps in place of the old ones on the component palette. Separated many compiler defines into a new
file
called KPDEFS.INC. ==================================== Version 2.18: 1) Thanks to the hard work of a fellow registered user, added the capability to remove all dep
end
encies on the Dialogs, Forms, Controls, and
File
Ctrl units by defining the conditional MAKESMALL, which results in a smaller footprint. This can be quite useful when putting VCLZip into a DLL for instance. In order to make this work, go into your
Project
| Options and select the Directories/Conditionals tab and enter MAKESMALL in the conditional defines text box. In Delphi you can add this conditinal define to the
project
options of your application that uses VCLZip and then do a "build all". In BCB you will have to add this to the
project
options of the package that contains VCLZip and then rebuild the package. If you define MAKESMALL, the only things you lose are: a) ZIP
file
open
dialog box that appears when the ZipName is set to "?" b) Select Directory dialog box that appears when the DestDir is set to "?" c) Changing the cursor to an hour glass during some operations. d) No long
file
name support in Delphi 1 2) Made VCLZip completely BCB4 compatible. 3) Added some exception handling to KPUNZIPP and KPINFLT, mainly to handle
unexpected
situations when wrong passwords are entered. This fixes the problem with PRP, the password recovery program. 4) For Borland C++ Builder, changed any COMP types to double, getting rid of the compiler warnings for unsupported comp type. This affects the OnStartZipInfo and OnStartUnZipInfo events, so you'll have to change the comp parameter to double in these events if you use them (in both your header
file
s and in the CPP
file
s). 5) Modified OnStartUnZip event so that FName (the
file
name of the
file
that is about to be unzipped along with complete path) is now a VAR parameter and can be modified. This allows you to change the path and name of a
file
that is about to be unzipped. This is especially helpfull in applications like Install Programs. NOTE: You will need to change your current code to add the VAR to the event definition and implementation if you already use this event in your application. (In BCB, add a & just before the parameter instead of VAR) 6) Moved many type definitions to VCLUNZIP.PAS so that kpZipObj won't have to be included in your USES list. 7) Fixed bug that caused GPF when setting Zip Comment to '' (empty string). 8) Moved strings in VCLZip/VCLUnZip into a string table, making the code size a little smaller as well as making it much easier to localize string information. However you have the option of not using the new string table, for whatever reason, by defining NO_RES in your
project
options (in the conditional defines text box on the Directories/Conditionals tab). 9) Removed the need for several
file
s. No longer included are kpstrm.res, kpstrm.rc, kpsconst.res, kpsconst.rc, kpstres.pas, and for Delphi 1, kpdrvs.pas. In some cases the need for these
file
s was eliminated and in other cases just rolled into the newly included kpzcnst.rc, kpzcnst.pas, and kpzcnst.res. Definining NO_RES in your
project
options will elimiate the need for these new
file
s but will make your code size slightly larger and you won't be able to localize your application without changing VCLZip source code. 10) Modified the On
File
PercentDone and OnTotalPercentDone progress events to work better when creating spanned disk sets and blocked zip sets. They no longer report 100% when the compressed
file
still has to be copied to disk. 11) Added the ReplaceReadOnly property. Setting this to true will allow
file
s with the ReadOnly attribute to be replaced during the unzip process. 12) Added the ifNewer and ifOlder options to the OverwriteMode property. (This had somehow made it into the help
file
but not into VCLUnZip) 13) Added the SFXToZip method which will convert an SFX
file
to a regular zip
file
. The header pointers will be properly adjusted during the conversion. 14) Fixed a problem where the OnGetNextDisk event would always revert to the DefaultGetNextDisk method instead of what you entered into the Object Inspector each time your
project
was re-
open
ed. 15) Fixed a bug that caused CRC errors when unzipping
file
s from spanned disk sets if they were STORED (no compression) and spanned across disks. 16) Added the OnZipComplete and OnUnZipComplete events. If defined, these will fire at the very
end
of a zip or unzip operation (after all
file
s have been processed, not after each
file
). These events will rarely be used since, normally you will be able to do the same thing at the point that the call to Zip or UnZip returns, but these events can be useful when using VCLZip in threads where in certain circumstances the return from the Zip or UnZip methods are not seen. 17) Creation of SFX
file
s has never been easier!!! The addition of the MakeNewSFX method allows you to create Self Extracting Executables without the need to create a zip
file
first. The
file
s that you specify in the
File
sList property will be zipped, using all the normal VCLZip property settings, and the SFX will be created, all in one step! In addition, you can create configurable SFX
file
s using this method, and you can do this especially easy by adding the new unit kpSFXOpt to your application's USES list and using the new 32bit SFX stub that is now distributed with VCLZip. This allows you to easily set things like SFX Dialog caption, default target extraction directory,
file
to launch after extraction, etc. 18) Fixed a memory leak that only affects applications using VCLZip that are compiled with Delphi 2, and that use wildcard specifications in the
File
sList property. Version 2.17a: 1) Fixed a bug that was keeping VCLZip from reading truncated zip
file
s or sfx
file
s that did not have their headers adjusted. 2) Fixed a bug that was causing a directory to be created on the C drive when doing integrity checking with the
File
IsOK property. 3) Added {$V-} to kpZipObj.PAS 4) Moved two AssignTo methods to public instead of private in kpZipObj.PAS Version 2.17: 1) Added Memory zipping and unzipping capabilities through the UnZipToBuffer and ZipFromBuffer methods. See the documentation for these methods in the Help
File
for more information. 2) New
File
IsOK Property allows you to check for the integrity of individual
file
s within an archive without actually unzipping the
file
. 3) Fixed a bug that kept checking of volume labels from working on WIN31 when working with spanned disk sets. 4) Removed all references to ChDirectory so that VCLZip will be more thread safe allowing separate instances of VCLZip in separate threads to be performing zip/unzip operations at the same time. 5) A new public property PreserveStubs allows you to make modifications to sfx archives and have the archive remain an SFX rather than revert back to a normal zip
file
. 6) Added a default OnGetNextDisk event. If one is not defined, then the default event will be called when the situation arises that a new disk is needed when zipping or unzipping a spanned or blocked zip archive. 7) Added more power to the wildcard capabilities. Now you can qualify the * wildcard character, for instance: * would satisfy any number of contiguous characters as long as they are all a thru e. * would satisfy any number of contiguous characters as long as none of them were a thru e. This allows you to do things like include
file
s in specific direcories into your ExcludeList. For instance: VCLZip1.ExcludeList.Add('c:\test\*.txt') would exclude the zipping of all .txt
file
s in the test directory but not in any subdirectories. 8) Fixed other minor bugs and made other code enhancements. Version 2.16: ***Please be aware that if you currently use the OnSkipping
File
event in any of your applications, version 2.16 will require a small modification as this event has an added parameter and one of the current parameters is used a little differently when being called by the zip operation. Please see the help
file
for more information. 1) The OnSkipping
File
Event has been changed slightly, adding a parameter for the
file
name. 2) OnSkipping
File
is now called when a
file
to be zipped is skipped because it is locked by another application. See the Help
File
for more information. 3) Fixed a bug with the Exclude and NoCompressList where they were ignoring entries with anything before the extention (i.e. 'some
file
.*' as opposed to '*.zip') if you were saving directory information. 4) Fixed a bug that caused an error if you added a wildcard with a non-existent directory to the
File
sList. 5) A few other minor bug fixes. Modifications for 2.15 include: 1) PackLevel can now be set to 0 (zero) which means no compression at all (STORED only). 2) New property ExcludeList is a new stringlist that you can add
file
names and wildcards to in order to specify
file
s that you do not wish to be included in an archive. 3) New property NoCompressList is a new stringlist that you can add
file
names and wildcards to in order to specify
file
s that you wish to be STORED with a PackLevel of 0 (zero), no compression. 4) All compiler warnings and hints were removed. Modifications for 2.14 include: 1) Delphi 4 compatability. 2) Added ability to use complex wildcards when specifying which
file
s are to be zipped. This includes wildcard characters not only in the
file
name but also in the pathname. This allows you to specify directories using wildcards, for instance: VCLZip1.
File
sList.add('c:\test\w*\mycode*.pas'); would get all PAS
file
s beginning with mycode in subdirectories under TEST that begin with the letter w. Wilcards may be much more complex than this. Please see the help
file
for more information. 3) Added the ability to override the RECURSE property setting when specifying
file
s to be zipped. By adding the following characters to the beginning of the
file
names being added, you can override whatever the current setting is for the RECURSE property: '>' will force recursion into subdirectories '|' will force NO-recursion For instance: VCLZip1.
File
sList.add('>c:\windows\*.ini'); will get all .ini
file
s in and below the windows directory reguardless of what the recurse property setting is. and: VCLZip1.
File
sList.add('|c:\windows\sys*\*.dll'); will get all .dll
file
s in subdirectories of the windows directories that start with 'sys' but will not recurse into any directories below the sys* directories. 4) The [ and ] characters previously used as special wildcard characters have been changed to since [ and ] are valid
file
name characters. If you still need to use the previous characters for backward compatability, I can show registered users how to easily modify a couple of constants in the source code in order to go back to the old style. See "Using Wildcards" in the help
file
for more information. 5) A few bug fixes. Modifications for 2.13 include: 1) New property ResetArchiveBitOnZip causes each
file
's archive bit to be turned off after being zipped. 2) New Property SkipIfArchiveBitNotSet causes
file
s who's archive bit is not set to be skipped during zipping operations. 3) A few modifications were made to allow more compatibility with BCB 1. 4) Cleaned up the Help
File
some. 5) KWF
file
now works for Delphi 1 and Delphi 2 again. Still can't get context sensitive help in Delphi 3. 6) Cleaned up some of the code that was causing compiler warnings and hints. Modifications for 2.12 include: 1) Added a TempPath property to allow the temporary
file
s path to be different from the Windows default. 2) Modified VCLZip so that any temporary
file
s that are created receive a unique temporary
file
name so as not to clash with any other
file
s in the temporary directory. This also allows working with zip
file
s residing in the temporary directory. 3) Fixed a bug in the relative path feature. 4) Fixed a bug that caused a "list out of bounds" error if a
file
in the
File
sList did not actually exist. Modifications for 2.11 include: 1) Fixed password encryption bug for 16 bit. 2) Fixed "invalid pointer operation" when closing application bug. 3) Fixed path device truncation bug which caused inability to modify existing archives in 16 bit. 4) Fixed inability to cancel during wilcard expansion bug. 5) Added capability to better handle corrupted timestamps. 6) Added capability to
open
and work with SFX
file
s that were created with the COPY/B method (header
file
s not adjusted). 7) Other small bug fixes. I'm still working on a bug which causes a GPF when continually unzipping the same
file
thousands to millions of times. This mainly affects programs like the Password Recovery Program (PRP) which uses the brute force method of searching for an archive's password. Modifications for 2.10 include: 1) Capability for 16bit VCLZip to store long
file
/path names when running on a 32bit OS. 2) New property (Store83Names) which allows you to force DOS 8.3
file
and path names to be stored. 3) Better UNC path support. 4) Fixed a bug to allow
file
s to be added to an empty archive. Modifications for 2.03 include: 1) Volume labels now get written correctly to spanned disk sets in Delphi 1 for all versions of Windows. 2) Delphi 1 VCLZip now correctly recognizes when it is running on Windows NT. 3) Fixed a problem with zipping
file
s in the root directory when StorePaths = True. 4)
File
and Zip Comments are now read correctly from spanned/blocked zip archives. 5) Fixed a buf that was causing "Duplicate Object" errors. Modifications for 2.02 include: 1) Fix for
file
comments which were supposed to be fixed in version 2.01 but weren't. 2) Fix for stream zipping. Version 2.01 would not create a new archive if using a stream. (The Stream Demo now allows creating new zip
file
s to streams too) 3) A few other minor modifications to further solidify the code. 4) A modification to the Zip Utility Demo which allows unzipping from Blocked zip
file
s as if they were single zip
file
s. 5) Added a read-only, published ThisVersion property which reflects the version of the VCLZip/VCLUnZip that you are currently working with. Modifications for 2.01 include: 1) Fixes for exceptions that were caused when CANCELING a zip or unzip of a spanned zip
file
. 2) Fix for a possible problem when zipping or unzipping a spanned zip
file
when one or more of the compressed
file
s resided on more than 2 of the spanned parts. 3) Fix for
file
comments which were broken in version 2.00. Additional features for version 2.00 include: 1) Modify/Add internal
file
details (
file
name, pathname, timestamp, comment) for any
file
while zipping, in the OnStartZip event. 2) Add an Archive Comment while zipping in the OnStartZipInfo event. 3) Delphi 1 compatiblity for VCLZip. 4) Stream to Stream Zipping - Archives themselves can now be TStreams! 5) New Relative Path Information option. 6) Unzip archives that weren't zipped with the Relative Path option turned on as if they had been by determining how much path information to use with the Rootpath property. 7) Modify timestamps for
file
s in existing archives (you could already modify
file
names and pathnames for
file
s in existing archives) 8) The OnBadPassword event now allows you to supply a new password and try the same
file
again when unzipping. 9) Source code has been cleaned up so that it will compile under Borland C++ Builder with no modifications. Also some bugs were fixed, most importantly: 1) An empty
file
, that had been compressed into an archive would cause any
file
added to the archive to cause the archive to approximately double in size. Any archives containing empty
file
s are not corrupted, they are OK. This was simply a fix to the way the archive was processed. 2) After creating an SFX
file
, you had to close the zip
file
before you could modify it in any way, otherwise a stream read error was encountered. See the Help
file
for more information on new features. This zip
file
is part of a self contained installation program. Just run it and the installation program will begin. Contact vclzip@bigfoot.com for further information Thanks! Kevin Boylan
终于搞懂了,预编译头文件
预编译头文件今天在改一个很大的程序,慢慢看,慢慢改。突然发现一个.c文件,里面什么也没有,就几个头文件,我一看,我靠,这不是把简单的问题搞复杂了吗,随手删掉那个c文件。结果不能编译了,我靠:fatal error C1083: Cannot
open
precompiled header
file
: \'Debug/v13_3.pch\':No such
file
or directory怎么rebuild all都不行。上网查了一下,才搞懂了:----------------总结------如果工程很大,头文件很多,而有几个头文件又是经常要用的,那么1。把这些头文件全部写到一个头文件里面去,比如写到preh.h2。写一个preh.c,里面只一句话:#include "preh.h"3。对于preh.c,在
project
setting里面设置creat precompiled headers,对于其他.c文件,设置use precompiled header
file
//哈哈我试了一下,效果很明显,不用precompiled header,编译一次我可以去上个厕所,用precompiled header,编译的时候,我可以站起来伸个懒腰,活动活动就差不多啦---------转载的文章----------预编译头的概念:所谓的预编译头就是把一个工程中的那一部分代码,预先编译好放在一个文件里(通常是以.pch为扩展名的),这个文件就称为预编译头文件这些预先编译好的代码可以是任何的C/C++代码--------甚至是inline的函数,但是必须是稳定的,在工程开发的过程中不会被经常改变。如果这些代码被修改,则需要重新编译生成预编译头文件。注意生成预编译头文件是很耗时间的。同时你得注意预编译头文件通常很大,通常有6-7M大。注意及时清理那些没有用的预编译头文件。也许你会问:现在的编译器都有Time stamp的功能,编译器在编译整个工程的时候,它只会编译那些经过修改的文件,而不会去编译那些从上次编译过,到现在没有被修改过的文件。那么为什么还要预编译头文件呢?答案在这里,我们知道编译器是以文件为单位编译的,一个文件经过修改后,会重新编译整个文件,当然在这个文件里包含的所有头文件中的东西(.eg Macro, Preprocesser )都要重新处理一遍。VC的预编译头文件保存的正是这部分信息。以避免每次都要重新处理这些头文件。预编译头的作用:根据上文介绍,预编译头文件的作用当然就是提高便宜速度了,有了它你没有必要每次都编译那些不需要经常改变的代码。编译性能当然就提高了。预编译头的使用:要使用预编译头,我们必须指定一个头文件,这个头文件包含我们不会经常改变的代码和其他的头文件,然后我们用这个头文件来生成一个预编译头文件(.pch文件)想必大家都知道 StdAfx.h这个文件。很多人都认为这是VC提供的一个“系统级别”的,编译器带的一个头文件。其实不是的,这个文件可以是任何名字的。我们来考察一个典型的由AppWizard生成的MFC Dialog Based 程序的预编译头文件。(因为AppWizard会为我们指定好如何使用预编译头文件,默认的是StdAfx.h,这是VC起的名字)。我们会发现这个头文件里包含了以下的头文件:#include // MFC core and standard components#include // MFC extensions#include // MFC Automation classes#include // MFC support for Internet Explorer 4Common Controls#include
arcgis工具
arcgis工具总结 1. 要素的剪切与延伸 实用工具 TASK 任务栏 Ext
end
/Trim feature 剪切所得内容与你画线的方向有关。 2. 自动捕捉跟踪工具 点击Editor工具栏中Snapping来打开Snapping Environment对话框 捕捉设置中有3个选项, vertex edge
end
分别是节点、终点、和边,选择
end
应该会捕捉端点 3. 图斑面积计算及长度计算 应用工具CALCULATE AREA 或者使用VBA代码实现 新建字段并开启Advanced 写入代码,面积计算: Dim Output as double Dim pArea as Iarea Set pArea = [shape] 在最后的一个空格里面写入代码(即:字段名)pArea.area 长度计算: Dim Output as double Dim pCurve as ICurve Set pCurve = [shape] Output = pCurve.Length 4. 剪切图斑 Task任务栏 cut polygon feature工具,需要sketch工具画线辅助完成 5. 配准工具 Spatial Adjustment 工具 需要注意先要 set adjustment data 然后配准 6. 影像校正 Georeferncing工具 7. 要素变形 Task 工具条中的reshape feature 配合sketch工具 8. 添加节点 Modify feature 在需要加点的地方右键单击insert vertex 也可单击右键选择properties 打开edit sketch properties对话框,在坐标点位置右键插入节点 9. 共享多边形生成 Auto-complete polygon 工具生成共享边的多边形,配合snapping environment更好。 10. 画岛图 1).使用任务栏中的sketch工具,当画完外面的一圈时,右键 选择finish part 然后画中间的部分 再右键finish sketch 2).分别画连个图斑然后应用Editor 工具栏中的工具先intersect(图斑重叠的地方创建一个新的图斑)然后Clip(剪切)即可。(补充其他工具:Union,把多个图斑联合起来并形成一个新的连接在一起的图斑,原图斑无变化,联合后的图斑不继承原任何图斑的属性;Merge,把多个图斑合并到其中一个图斑上并继承它的属性,原图斑变化;Split用于间断线段,但得知道具体的长度,如果不知道那么长度或者没必要那么精确就直接用Eeitor工具栏的Split tool工具 ) 11. 连接外界属性数据(如:.xsl文件等) 利用JOIN 工具可以方便的实现与外界属性数据的关联,但这种关联是依赖于外界数据库本身的,需经过重新导出之后即完全保存在相应图层属性页。在做外联如EXCEL等的时候对数据有一些要求,确保第一行包含字段名,这些字段名不能超过十个字母,不能出现特殊字符。最好把EXCEL保存为.csv文件去除一些不兼容的内容再连接。 转载ESRI论坛Lucy1114帖子说明: 12. 导出Shape格式为其他软件识别的打印格式如JEPG等格式
FILE
/EXPORT MAP 然后选择相应的图片格式,此时也可设置答应的分辨率 pdi 13. 建立注记层 方法一.carvert to Ananotation ,方法二.Draw工具条 方法三.从其他地方转换注记图层 14. 查看特定区域范围内的某种地物分布情况 Selection / select by location 15. 如何用面生成中线 先把数据转成coverage格式,workstion里有Centerline命令。 另外ArcToolBox->Data Management Tools->Generalization->Collapse Dual Lines To Centerline也行。不过以上做法要求边界是双线。你必须先把面转成线,特别是参数的设置。也可以尝试下sketch工具条中的midpoint tool 后面有详细的讲解过程。 16. 根据坐标数据生成点 方法一. :[工具] >>[添加XY 数据],在“添加XY 数据”窗口中,选择已添加的 XY 数据表,指定X 坐标字段(东经)和Y 坐标字段(北纬),按“编辑”按钮,选择坐标系统。一般GPS系统采用的坐标系统为WGS_1984。 方法二.直接用TOOL工具下的ADD XY 可以单个加点 17. 用任意多边形剪切栅格数据(矢量数据转换为栅格数据) 在ArcCatalog下新建一个要素类(要素类型为:多边形),命名为:ClipPoly.shp 在ArcMap中,加载栅格数据:Landuse、和ClipPoly.shp 打开 编辑器工具栏,开始编辑ClipPoly ,根据要剪切的区域,绘制一个任意形状的多 边形。打开属性表,修改多边形的字段“ID”的值为1,保存修改,停止编辑。 打开 空间分析工具栏 GIS软件应用-ArcGIS 执行命令:--- 指定栅格大小:查询要剪切的栅格图 层Landuse 的栅格大小,这里指定为25 指定输出栅格的名称为路径 执行命令: - 构造表达式:[Landuse]*[polyClip4-polyclip4] ,执行栅格图层:Landuse 和 用以剪切 的栅格polyClip4 之间的相乘运算 GIS软件应用-ArcGIS 得到的结果即是以任意多边形剪切的Landuse数据 18. 栅格重分类(Raster Reclassify) 通过栅格重分类操作可以将连续栅格数据转换为离散栅格数据 19. Eliminate合并破碎多边形 以下的操作将会把面积小于10000 平方米的多边形合并到周围与之有最长公共 边的多边形中: 执行菜单命令[选择]>>[通过属性选择],查询”Area”Masking Tools->Intersecting Layer Masks,为注记创建模版,模版的大小用参数Margin来决定 3).右键点击数据框,在环境菜单中选择高级绘制选项(Advanced Drawing Options),用注记的模版图层去遮盖线图层,确定 23.同一图层使用Clip实现图斑的无缝拼接 当一个图斑的边界确定,需要实现两个图斑的无缝拼接时,可以把图斑拉伸覆盖确定边界的图斑的一部分,然后用下面的图斑剪区上面的图斑。 方法二:图斑之间有小的缝隙,可以先在缝隙上任意补画一个图斑,然后合并(merge)图斑,最后再剪切(Clip)即可得到无缝的图斑。 如下图所示: 24.利用两个相交图斑创建新图斑。 两个图斑都选中然后 Eidtor 工具条intersect,此方法原图斑不会被接切。 25.属性表中选择集与非选择集的切换 Options/switch selection 26.快速把选择的要素另存为一个图层并加载进来。 先选责需要另存图层的要素(直接选择或者属性表),然后在图层上右键Selection/create Layer From Selected Features。 (以前都是直接export竟然没有发现) 27.利用Hyperlinks丰富数据库,为其添加超链接。 单击rowse工具栏中Identify按钮。 单击地图中一个要素,在Identify Results窗口右击需要设置超链接的要素,然后点击Add Hyperlink菜单。若要将一个Web页加为超链接,单击项,并输入URL。要链接到一个文档,单击Link to a Document,并输入文档路径名。 单击Tools工具栏中的Hyperlink工具,并单击图上某一个要素即可实现。 使用一个属性字段作为超链 在内容表中右击包含一个超链接字段的图层,然后点击properties ,单击Display选项卡。选中Supprt Hyper3. Hyperlinks using field选项,单击下拉箭头并点击一个字段。 单击Document or URL。单击OK,单击Tools中的Hyperlink按钮,将鼠标指移到一要素上并单击以
显示
其超链接。 28.Arcmap中的SQL语言 当查询ArcInfo coverages, shape文件, INFO表以及dBASE表时,SQL表达式中的字段名必须用双引号扩起。如:“AREA”,如果查询的是个人地理数据库数据,则需要将字段名包含在方括号内,如:[AREA],如果查询的是ArcSDE地理数据库数据或是ArcIMS要素类或ArcIMS影象服务子层中的数据,则不需要将字段名括起,如:AREA 有些运算符和关键字也可能有所变化。 在查询表达式中,字符串必须加单引号,例如: [STATE_NAME]=‘California’ 除个人地理数据库要素类和表之外,查询表达式中的字符串是区分字母大小写的。如果搜索不需要区分大小写,可以使用SQL函数将所有的值都转换成大写或者小写。对于基于文件的数据源,例如shape文件或coverages,既可以使用UPPER函数,也可以使用LOWER函数。 例如下面这个查询将选出那些姓名的最后为Jones或JONES的顾客。 UPPER("LAST_NAME") = 'JONES' 可以用LIKE运算符(不是 = 运算符)与通配符一起构建部分字符串查询。 例如,表达式 [STATE_NAME] LIKE 'Miss*'将在美国州名中选择Mississippi和Missouri。 *表示多个字符。 还比如,查询表达式 [OWNER_NAME] LIKE '?atherine smith' 将找出Catherine Smith和Katherine Smith。 ?表示单个字符。通配符的使用依赖于不同的数据库。例子中使用的通配符只适用于个人地理数据库。 可以使用NULL关键字来选择那些在指定字段中值为NULL的要素和记录。通常,NULL关键字的前面总有IS或IS NOT。 29.Select by location小结 按位置查找要素的方法 使用按位置选择(Select By Location) 对话框,可以根据要素间的相对空间位置进行查找。可以使用多种方法,查找在同一图层中或不同图层间相互邻近或叠置的点、线、多边形等要素。 被…跨越边界(Are crossed by the outline of) 利用这种方法,选择被另一图层要素覆盖的某个图层上的要素。例如,搜索道路跨越的荒地,得到的结果是道路跨越其边界的所有荒地。 相交(Intersect) 与Are crossed by the outline of类似,但是该方法可以选择与参照要素接连的要素。例如,选择与道路相交的荒地,选择的结果将包括该道路在其边界范围之内或在其边界之上的所有荒地。 在…距离范围内(Are within a distance of) 这一方法将选择同一图层或不同图层上相邻或邻近的要素。例如,现有一个包括清洁井和污染井的图层,使用该方法可以找出距离污染井500米范围内的所有清洁井。同样,也可以找出距离污染井500米范围内其他图层上的水库和农田。还可以用该选项选择与其他要素相毗邻的要素。例如,假如用户已选定了公司可能购买的地块,现在想获取邻近地块的信息。这种情况下,利用该选项选择选中地块零距离范围内的所有地块即可。 中心在…里(Have their center in) 这种方法选择某一图层上的要素,其中心点落在另一图层要素中。 完全在…内(Are completely within) 这种方法选择完全落在另一图层多边形内部的某一图层上的要素,例如,选择林区里面的湖泊。通过指定一个缓冲距离,可以选择落于多边形内部并距离多边形边界一定范围内的所有要素。例如,选择林区内部500米范围内的湖泊。 完全包含(Completely contain) 这种方法选择某一图层上完全包含另一图层上的要素的多边形。例如,选择内部包含湖泊的林区。通过指定一个缓冲距离,可以选择在其内部一定范围内包含要素的多边形。例如,对湖泊做缓冲区,可以选择距离湖泊500米范围内的林区。 与…有公共线段(Share a line segment with) 这种方法选择那些与其他要素具有公共线段、顶点或节点的要素。 与…等同(Are identical to) 这种方法选择与另一图层中某一要素具有同样几何形状的所有要素。这时,要素类型必须相同。举个例子:必须用多边形选择多边形,用线段选择线段,用点选择点。 包含(Contain) 这种方法选择某一图层中包含另一图层中要素的要素。这种方法与完全包含(Completely contain)方法的区别在于:要素间的边界可以接触。例如,使用包含(Contain)方法,即使湖泊的边界和包含该湖泊的森林的边界接触,森林也会被选中。但是在用完全包含(Completely contain)方法时,森林是不会选中的。 包含于(Are Contained by) 这种方法选择某一图层中被另一图层中要素包含的要素。例如,选择被乡村包围的城市。这种方法和完全包含于(Are completely within)方法的区别在于,要素的边界可以接触。 与…接触(Touch the boundary of) 如果使用包含线的图层来选择要素,则该方法将选择那些与此图层里的线有公共线段,顶点或端点(节点)的线和多边形要素。如果跨越了线,则这些线和多边形将不会被选中。 如果使用包含多边形的图层来选择要素,则该方法将选择那些与此图层里的多边形边界有公共线段或顶点的线和多边形要素。如果跨越了多边形边界,则这些线和多边形将不会被选中。 31. 将选中的要素放大至整个窗口 在内容表中右击包含选中要素的图层,单击Selection菜单,并单击Zoom To Selected Features子菜单。 选中要素将放大至整个ArcMap窗口。 32.
显示
选中要素的属性 在内容表中右击选中要素所在图层,单击
Open
Attribute Table,单击Show Selected records。 窗口中
显示
出选中要素的属性记录。也可以打开属性表在select和all之间切换。 33. 通过单击要素添加文本 1). 在内容表中,右击需要添加标注的图层,单击Properties。 2). 单击Labels选项卡。 3). 单击Label Field下拉箭头,单击作为标注的字段。 4). 单击OK。 5). 单击Draw工具条上的Label按钮。 应该是只需单击下拉箭头选择Label按钮。 6). 单击Place label at position clicked。 如果选择了Automatically find best placement,ArcMap会自动的为标注寻找合适的位置。 7). 单击Choose a style,然后单击需要的标注样式。 8). 在需要标注的要素上单击鼠标,标注就添加上去了。 (先在Draw工具条下新建标注组方便管理,New Annotation Group) 34. 标注工具条和标注管理器 如果图层中有一些要素需要指定特殊的标注属性,需要在标注管理器中生成其它的标注类。 点击左侧面板上的一个图层,在右侧面板上为其添加一个新的标注类。 个人认为此方法虽然没有转为注记后的标注灵活,但却可以方便的实现自动相对智能化的标注,相比之下更省心,提高效率。 35. 在进行地图查询或编辑的时候为什么会总是选中所有的图层 诀窍在这里(虽然是一点点小问题,但当我第一次遇到这个问题时却花费了我不少时间,甚至于怀疑自己的数据有问题) 36.建立拓扑关系检查图斑 先根据需要在Catalog中建立相应的拓扑关系规则,然后在Arcmap中进行拓扑处理,辅助工具条Topolygon,下图所示为重叠图斑检查。(也可以在Arctoolbox下的Data Management tools/topology来做) 有关geodatabase的topology规则 多边形topology 1).must not overlay:单要素类,多边形要素相互不能重叠 2).must not have gaps:单要素类,连续连接的多边形区域中间不能有空白区(非数据区) 3).contains point:多边形+点,多边形要素类的每个要素的边界以内必须包含点层中至少一个点 4).boundary must be covered by:多边形+线,多边形层的边界与线层重叠(线层可以有非重叠的更多要素) 5).must be covered by feature class of:多边形+多边形,第一个多边形层必须被第二个完全覆盖(省与全国的关系) 6).must be covered by:多边形+多边形,第一个多边形层必须把第二个完全覆盖(全国与省的关系) 7).must not overlay with:多边形+多边形,两个多边形层的多边形不能存在一对相互覆盖的要素 8).must cover each other:多边形+多边形,两个多边形的要素必须完全重叠 9).area boundary must be covered by boundary of:多边形+多边形,第一个多边形的各要素必须为第二个的一个或几个多边形完全覆盖 10).must be properly inside polygons:点+多边形,点层的要素必须全部在多边形内 11).must be covered by boundary of:点+多边形,点必须在多边形的边界上 线topology 1).must not have dangle:线,不能有悬挂节点 2).must not have pseudo-node:线,不能有伪节点 3).must not overlay:线,不能有线重合(不同要素间) 4).must not self overlay:线,一个要素不能自覆盖 5).must not intersect:线,不能有线交叉(不同要素间) 6).must not self intersect:线,不能有线自交叉 7).must not intersect or touch interrior:线,不能有相交和重叠 8).must be single part:线,一个线要素只能由一个path组成 9).must not covered with:线+线,两层线不能重叠 10).must be covered by feature class of:线+线,两层线完全重叠 11).
end
point must be covered by:线+点,线层中的终点必须和点层的部分(或全部)点重合 12).must be covered by boundary of:线+多边形,线被多边形边界重叠 13).must be covered by
end
point of:点+线,点被线终点完全重合 14).point must be covered by line:点+线,点都在线上 Topology工具条及功能介绍: 37.给多个要素同一赋值 选中你需要同一赋值的是所有图斑,然后点击Atrributes,此时出现属性修改对话框,点击根目录是对所有要素同一赋值,点击下面的支目录则可以分别赋值。(也可以用字段计算器实现) 38.如何根据确定的点画出以他相应的点 例如:我在地图上已经指导了一个一直点,而其他的点在地图上都是以他为中心画出来的。学校 SE60度,140米 意思是学校在中心点南偏东60度,距离是140米,这样的点在arcmap中怎么加呢?我的方法有二分别如下。 1). 确定已有一个点图层,其中有学校,然后: 对该图层开始编辑 选择工具栏editor---direction-distance tool 以中心点为中心,先画角度线(arcmap左下角会有角度提示),再画距离/半径(注:画的过程中点击A键可以输入角度值,点击D键可以输入距离值) 确定,即可 如果找不到direction-distance tool 的同志请看下面 Direction-distance tool is here 第二种方法就是直接编写代码实现 下面是一段示例的VBA代码(本段代码作者:GIS空间站 knight_sl) Option Explicit Dim dPoint(2, 1) As Double Sub aaa() Call bbb Dim aa As IMxDocument Set aa = ThisDocument Dim pFLyr As IFeatureLayer Set pFLyr = aa.FocusMap.Layer(0) Dim pFCsr As IFeatureCursor Dim pFt As IFeature Set pFCsr = pFLyr.FeatureClass.Update(Nothing, False) Set pFt = pFCsr.NextFeature Dim pPoint As IPoint Set pPoint = pFt.ShapeCopy Dim pNewPoint As IPoint Dim X0 As Double, Y0 As Double Dim X As Double, Y As Double Dim dAngle As Double Dim i As Long For i = 0 To UBound(dPoint, 1) Set pFt = pFLyr.FeatureClass.CreateFeature Set pNewPoint = New Point dAngle = dPoint(i, 0) * 3.14159263579893 / 180 pNewPoint.X = dPoint(i, 1) * Cos(dAngle) + pPoint.X pNewPoint.Y = dPoint(i, 1) * Sin(dAngle) + pPoint.Y Set pFt.Shape = pNewPoint pFt.Store Next Set pFLyr = Nothing Set pFCsr = Nothing Set pFt = Nothing Set pPoint = Nothing Set pNewPoint = Nothing
End
Sub Sub bbb() '定义新加三个点的角度和距离 dPoint(0, 0) = 10 dPoint(0, 1) = 150 dPoint(1, 0) = 30 dPoint(1, 1) = 170 dPoint(2, 0) = 120 dPoint(2, 1) = 200
End
Sub 这中方法做起来需要一点编程经验,但是比上面那中一个一个的画的方法要先进多了,可以把所有的点录入同时画出来。 如果你不会VBA编程,请看下面: 这是ArcGIS VBA的程序,运行的方法: 1),运行ArcMap,加载所需图层; 2),Tools菜单/Macros(宏)/Visual Basic Editor(VB编辑器),这样打开VB编辑器 3),双击打开VB编辑器左上工程资源管理器中的
Project
/ArcMap对象/ThisDocument,把上面的代码粘进去。注意看首行 Option Explicit如果有两行,就删除一行。 4),点击VB编辑器工具栏的运行按钮运行(或菜单 运行/运行子过程),就可以了,再激活ArcMap可以看到发生了什么! 或者还有一种创建宏的方法(不过建议对ArcGIS VBA不大熟的同志不要用这种方法): 1),运行ArcMap,加载所需图层; 2),Tools菜单/Macros(宏)/Macros,这样打开宏编辑器 3),在宏名称中输入aaa,确定后,会打开VB编辑器,将看到有一个aaa的过程,没有实体。你把上面的aaa过程中的代码粘进去,然后在前面加上 Option Explicit(这个别重复了哈) Dim dPoint(2, 1) As Double 就可以。 4),点击VB编辑器工具栏的运行按钮运行(或菜单 运行/运行子过程),就可以了,再激活ArcMap可以看到发生了什么! 39.这里说道了工具的使用,那么就简单的再介绍下Sketch中的几个工具吧 Sketch construction tools的使用: Sketch tool:主要是用来创造线和面特征的节点,在你完成了草图之后,ArcMAP就会增加最后的线段,形成矢量图。 Arc tool:这个主要是帮你创造一个弧段的,选中这个工具后,先在弧段起点点一下,然后在弧段高度方向大致位置点一下(这个点是不可见的,只是给你确定弧段的高度),最后在弧段的终点点一下,就形成一条弧段了。 Direction-distance tool:这个主要是从已知某一个方向和某一个距离来确定一个点。首先点一个已知方向的点,这是会有一条线出来,你确定好方向后,再点已知距离的点,这是出来一个圆,确定距离后,直线和圆有交点,这就是你要的点,再上面点一下就ok! Distance-distance tool:这个和上面的一样的道理,只是它都用距离来确定一个点,也就是两个圆确定你要的点。
End
point arc tool:这也是创造弧段用的,与Arc tool 工具不同的是,它是先在弧段的起点点一下,然后在弧段的终点点一下,再点一个点确定弧段的半径。个人认为这个工具要比Arc tool工具更精确些。 Intersection tool:就是利用两条直线确定一个点。很简单一用就会! Midpoint tool:确定中点的工具,比如马路的中点,你可以先点一边,再点马路另一边,这时马路的中点自动出现了。 (画道路中线太可以试试,不过得是直线道路咯,^_^) Tangent tool:相切弧段工具,它能够在一条线段上画出一条切线,只有你用其他工具画了线段出来时你才可以用这个工具。 Trace tool: 主要是用来在跟踪已存在的特征,比如一栋房子,你要沿房子外围画一条线(比如围墙),那么你使用这个工具就非常方便,首先开始时你必须按O键,设置下跟踪的间距,如100,其中还有三个角点的方式:mitered是直角 bevelled 是钝角rounded是圆角。(感觉那效果有点像CAD的偏移咯) 40.如何标注多个字段的属性及分子式标注 Propertis/label field /expression 实例:""& [单位名称] &"" & VbCrLf & " " & [PARCEL_NO] 输出分数线 VbCrLf 换行 效果图: 引用GIS空间站 兔八哥文章详解 以前用ArcGIS Label一般也就在图层的Properties里面定义一下Label字体大小和粗细。这两天遇到一个问题,需要在Label中
显示
多个字段的内容,比如BlockName和CompanyName。其实这个本来不是很难的问题,因为Label中支持VBScript,使用[BlockName] & VbNewLine & [CompanyName]。就可以实现标注中第一行
显示
BlockName,第二行
显示
CompanyName. 现在问题出来了,出图时候希望突出BlockName效果,希望加粗
显示
,而CompanyName使用一般字体。考虑了很长时间终于从ArcGIS帮助中找到了相关的内容,原来Label的VBScript里面支持类似于Html的VBScript标签,比如加粗就是用,上面问题就可以使用下面语句解决: "" & [BlockName] & "" & VbNewLine & [CompanyName] 除了加粗,ArcGIS中还支持下面的文本格式标签: Font: "" & [LABELFIELD] & "" Color: "" & [LABELFIELD] & "" "" & [LABELFIELD] & "" Bold: "" & [LABELFIELD] & "" Italic: "" & [LABELFIELD] & "" Underline: "" & [LABELFIELD] & "" All caps: "" & [LABELFIELD] & "" Small caps: "" & [LABELFIELD] & "" Superscript "" & [LABELFIELD] & "" Subscript: "" & [LABELFIELD] & "" Character spacing (%): "" & [LABELFIELD] & "" Word spacing (%): "" & [LABELFIELD] & "" Leading (pts): "" & [LABELFIELD] & " nFZLength Then For i=0 To (nFMLength-nFZLength)/2 strLeftSpace =strLeftSpace +chr(32) strRightSpace =strRightSpace + chr(32) Next
End
If FindLabel = "" &strLeftSpace; & [OBJECTID]&strRightSpace;& ""&chr;(13)&chr;(10)& [SHAPE_Area]
End
Function 41.用点构面 ArcToolBox->Samples->Data Management->Features->Create Features From Text
File
点组成面,最重要的是点序的排列,因此对数据的组织有一定的要求。 42.几个常用的VBA代码 在ARCGIS属性表中增加需要的字段,并自动赋值 使用方法 1打开属性表,选择计算的字段,右点选择Calculate Values;2.选择“是”,进入Field Calculator; 2选择Advance选项; 3 在Pre-Logic VBA Script Code编辑框中输入VBA代码; 4在下面编辑框中输入赋值部分. 1--点坐标X VBA部分: Dim pGeo As IGeometry Set pGeo = [Shape] Dim pPoint As IPoint Set pPoint = pGeo 赋值部分: pPoint.X 2--点坐标Y VBA部分: 同上 赋值部分: pPoint.Y 坐标值为文件存储的固有值,和是否使用On the Fly坐标表示无关。返回当前
显示
的坐标值参看8,9 3--多边形周长 VBA部分: Dim pGeo As IGeometry Set pGeo = [Shape] Dim pPolygon As IPolygon Set pPolygon = pGeo 赋值部分: pPolygon.Length 4--多边形面积 VBA部分: Dim pGeo As IGeometry Set pGeo = [Shape] Dim pPolygon As IPolygon Set pPolygon = pGeo Dim pArea As IArea Set pArea = pPolygon 赋值部分: pArea.Area 5--多边形重心X VBA部分: Dim pGeo As IGeometry Set pGeo = [Shape] Dim pPolygon As IPolygon Set pPolygon = pGeo Dim pArea As IArea Set pArea = pPolygon Dim pPoint As IPoint Set pPoint = pArea.Centroid 赋值部分: pPoint.X 6--多边形重心Y VBA部分: 同上 赋值部分: pPoint.Y 7--Polyline长度 VBA部分: Dim pGeo As IGeometry Set pGeo = [Shape] Dim pPolyline As IPolyline Set pPolyline = pGeo Dim pCurve As IPolycurve Set pCurve = pPolyline 赋值部分: pCurve.Length 8--表示点坐标X VBA部分: Dim pDoc As IMxDocument Set pDoc = ThisDocument Dim pSpRef As ISpatialReference Set pSpRef = pDoc.FocusMap.SpatialReference Dim pClone As IClone Set pClone = [Shape] Dim pGeo As IGeometry Set pGeo = pClone.Clone Dim pPoint as IPoint Set pPoint = pGeo pGeo.
Project
pSpRef 赋值部分: pPoint.X 9--表示点坐标Y VBA部分: 同上 赋值部分: pPoint.Y 坐标值为On the Fly
显示
的坐标,不是文件存储的固有坐标 10--连续编号 VBA部分: Static lCount as long lCount=lCount+1 赋值部分: lCount (从1开始) lCount-1 (从0开始) 计算面的中点 Dim Output As Double Dim pArea As IArea Set pArea = [Shape] Output = pArea.Centroid.X(或y) 当然这是很老的方法了,现在arcgis9.2以后都不需要用VBA啦,右键属性表字段然后直接选择 Caculate Geometry就可以实现比如面积计算,X,Y坐标等的属性赋值了咯。 43. 在同一图层如何对同一要素的不同部分以不同的符号表示 (注:要实现这种渲染需要两段具有不同的属性) 44.自己做arcMAP的图例 在Symbol property Editor中进行制作了 1)、先在Style Manager中的左侧列表中,选择相应的Style文件,ArcGIS默认的符号库文件是ESRI.Style文件,当然也给出了C:\Documents and Settings\........................................目录下用于用户自定义的Style文件 2)、展开Style文件,选择要创建Symbol的类型,如:Fill Symbol(面填充)、Line Symbol(线)、Marker Symbol(点) 然后在右侧的列表中鼠标右键->New 3)、在弹出的Symbol Property Editor窗体中,进一步选择Marker Symbol的类型,如:Simple Marker Symbol、Picture Marker Symbol等等 4)、这个时候就要根据需要开始设计符号的各种属性了,由于不同种类的Marker Symbol有不同的属性,因此,属性也会不尽相同。 5)、另外介绍一个经常需要或比较使用的步骤,我们需要设计的符号可以由ESRI提供的现有符号组合而成,那么我们则需要添加2个Symbol Layer,然后进行2个Symbol Layer的叠加 6)、分别设置上述2个Symbol Layer的中的Symbol的属性,之后确认保存,这样会在Style Manager中看到我们新制作的符号 如图: (注:以上内容转载自ESRI社区 gis27) 45.计算属性中相同的字段个数 选择要计算的字段然后右键选择Summarize根据相应的要求设置参数即可实现。功能示意如下图: 46.自动提取面的中点并加点 Arctoolbox->Feature-> Feature to Point 47.合并属性相同的相邻图斑 使用Dissolve 当选择了create multipart feature时,所有具有相同属性的图斑将链接在一起做为一个图斑。 48.提取图斑转折点坐标 如果没有伪节点那么,选中一个线或者面,打开sketch Properties,就可以看到节点坐标。 还有一种方法就是:通过toolbox-datamanagement-feature-FeatureVerticesToPoints得到转折点的图层然后Add XY Coordinates,该点图层的属性表中就包含了X,Y字段,将其导出,就得到转折点坐标了。 ArcMap中设置.mxd相对路径 复制拷贝地图文档后再次打开会遇到图层前一个!的标识符号,是因为加载图层的相对路径变化了,需要重新指定图层位置。对此将.mxd文档设置为相对路径起到作用,具体做法如下: (1)
File
-->Document Properties-->打开对话框中,点击Data Source Options...按钮; (2)选中store relative path names to data sources单选框,并勾选Make relative paths the defalut of...前的复选框。 以上两步操作即可。 在dissolve时,出现 ERROR 000354: The name contains invalid characters Failed to execute (Dissolve).
End
Time: Thu Mar 24 09:32:47 2011 (Elapsed Time: 0.00 seconds) output文件包括无效字符如中划线等 Geometry First [Editor's note: I was having trouble last week dissolving a shape
file
based on a common attribute. I kept getting the following error: "Invalid Topology [INCOMPLETE_VOID_POLY]“. Not entirely helpful! A little Google searching turned up the following tip from ESRI.] Republished from ESRI. Problem: Some Overlay Tools, such as Intersect, return
unexpected
results or fail Description Results do not look correct or operations fail with strange errors such as: “Invalid Topology [INCOMPLETE_VOID_POLY]“. If this type of error has occurred, it is most likely to occur when using one of the following: Clip, Erase, Identity, Intersect, Symmetrical Difference, Union, Update, Split Featureclass to Coverage, Dissolve, Feature to Line, Feature To Polygon, Integrate, or ValidateTopology. Cause It is possible that tool outputs may be strange or incorrect because one or more features in the input feature class have geometry problems. Some examples of geometry problems are: • short segments • null geometry • incorrect ring ordering • incorrect segment orientation • unclosed rings • self-intersections or empty parts Solution or Workaround If such errors occur or the output looks incorrect, the first step in assessing the situation is to run the ArcToolbox tool Data Management Tools > Features > Check Geometry. -show me This tool provides a list of the invalid features in the feature class and a short description of the problem. Features with problems can be fixed in one of two ways: Editing the feature class with the geometry problem, and fixing each individual problem identified. Some of these problems, like non-simple geometry, can be fixed by double-clicking the feature in the editor and saving the edits. Running the ArcToolBox tool Data Management Tools > Features > Repair Geometry on the feature class containing the problem features 昨天检查一区属性发现一区图层的面积属性shape_area竟然出现了负值,想必是数据转换的时候出现了问题。今天在论坛求证了一下,感谢各位的解答。 ArcGIS默认顺时针图形为正,手工画polygon的时候不管怎么画结果都是顺时针的。所以一般负值的出现是转换过程出现问题,polygon是由ring组成的,ring则是有更小的segement(line,circularArc,ellipticalArc,beziercurve)构成,所具有方向性。 解决方法是用ArcTool中的check geometry和 repair geometry工具,上述的检查结果是Incorrect ring ordering。repair后会自动修复错误,已解决。 此外,repair工具只能修复以下五种错误: Null geometry—The feature will be deleted from the feature class. Short segment—The geometry's short segment will be deleted. Incorrect ring ordering—The geometry will be updated to have correct ring ordering. Incorrect segment orientation—The geometry will be updated to have correct segment orientation. Self intersections—The geometry's segments that intersect will be split at their intersection. Unclosed rings—The unclosed rings will be closed. Empty parts—The parts that are null or empty will be deleted. 更多的错误修复参照帮助中的 How to salvage a corrupt shape
file
fatal error C1010:
unexpected
end
of
file
while looking for precompiled header directive。
寻找预编译头文件路径时遇到了不该遇到的文件尾。(一般是没有#include "stdafx.h") 编译程序中出现“fatal error C1010:
unexpected
end
of
file
” http://www.china-askpro.com/msg24/qa08.shtml编号:QA002308建立日期: 1999年12月24日 最后修改日期:2003年6月
VC编译常见错误
1、Fatal Error C1010
unexpected
end
of
file
while looking for precompiled header directive 这一般是由于使用了参数/Yu"stdafx.h",意思是在每个文件中都应该使用#include来包含这个头文件。一般改正,就是在每个。CPP文件中包含这个文件就可以。 2、LNK2001 on __beginthr
C语言
69,369
社区成员
243,082
社区内容
发帖
与我相关
我的任务
C语言
C语言相关问题讨论
复制链接
扫一扫
分享
社区描述
C语言相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章