filegdb 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +18 -0
  3. data/.travis.yml +4 -0
  4. data/Gemfile +3 -0
  5. data/LICENSE +28 -0
  6. data/Makefile +12 -0
  7. data/README.md +27 -0
  8. data/Rakefile +24 -0
  9. data/ext/filegdb/base.hpp +126 -0
  10. data/ext/filegdb/extconf.rb +13 -0
  11. data/ext/filegdb/filegdb.cpp +27 -0
  12. data/ext/filegdb/filegdb.hpp +44 -0
  13. data/ext/filegdb/filegdb/include/FileGDBAPI.h +30 -0
  14. data/ext/filegdb/filegdb/include/FileGDBCore.h +226 -0
  15. data/ext/filegdb/filegdb/include/Geodatabase.h +291 -0
  16. data/ext/filegdb/filegdb/include/GeodatabaseManagement.h +79 -0
  17. data/ext/filegdb/filegdb/include/Raster.h +101 -0
  18. data/ext/filegdb/filegdb/include/Row.h +336 -0
  19. data/ext/filegdb/filegdb/include/Table.h +296 -0
  20. data/ext/filegdb/filegdb/include/Util.h +936 -0
  21. data/ext/filegdb/filegdb/include/make.include +98 -0
  22. data/ext/filegdb/filegdb/lib/libFileGDBAPI.dylib +0 -0
  23. data/ext/filegdb/filegdb/lib/libFileGDBAPI.so +0 -0
  24. data/ext/filegdb/filegdb/lib/libfgdbunixrtl.dylib +0 -0
  25. data/ext/filegdb/filegdb/lib/libfgdbunixrtl.so +0 -0
  26. data/ext/filegdb/geodatabase.cpp +529 -0
  27. data/ext/filegdb/geodatabase.hpp +53 -0
  28. data/ext/filegdb/multi_point_shape_buffer.cpp +254 -0
  29. data/ext/filegdb/multi_point_shape_buffer.hpp +35 -0
  30. data/ext/filegdb/point.cpp +44 -0
  31. data/ext/filegdb/point.hpp +31 -0
  32. data/ext/filegdb/point_shape_buffer.cpp +162 -0
  33. data/ext/filegdb/point_shape_buffer.hpp +32 -0
  34. data/ext/filegdb/row.cpp +222 -0
  35. data/ext/filegdb/row.hpp +37 -0
  36. data/ext/filegdb/shape_buffer.cpp +19 -0
  37. data/ext/filegdb/shape_buffer.hpp +20 -0
  38. data/ext/filegdb/shape_buffer_base.hpp +33 -0
  39. data/ext/filegdb/table.cpp +65 -0
  40. data/ext/filegdb/table.hpp +29 -0
  41. data/ext/filegdb/util.cpp +16 -0
  42. data/filegdb.gemspec +23 -0
  43. data/lib/filegdb.rb +2 -0
  44. data/lib/filegdb/version.rb +3 -0
  45. data/spec/data/domain_definition.xml +22 -0
  46. data/spec/data/domain_definition_altered.xml +26 -0
  47. data/spec/data/feature_dataset_definition.xml +25 -0
  48. data/spec/data/table_definition.xml +177 -0
  49. data/spec/filegdb_spec.rb +36 -0
  50. data/spec/geodatabase_spec.rb +107 -0
  51. data/spec/multi_point_shape_buffer_spec.rb +58 -0
  52. data/spec/point_shape_buffer_spec.rb +39 -0
  53. data/spec/row_spec.rb +76 -0
  54. data/spec/spec_helper.rb +41 -0
  55. metadata +153 -0
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzFlYzdmNzU1Y2Y2NTg0MTZhMGFmNGFkMTJjZmVmZGViYmRkMjZhOQ==
5
+ data.tar.gz: !binary |-
6
+ MzM3ZmU2M2NkNTA3MjZhZjRhNWI0ZTc5OWU0ODE3ZDFiYTQyOTJjZA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ OWZmMzc0NDIyZWE3NWE2ZjBkM2M0Y2FjZTQ2YWYwYTc2YTA1ZjU5M2JlNjRk
10
+ MzY3NWE3OWFlMGQ2OTc5Mjk1NzYwYmI4ZTUxZjdkZDM3ODY2Y2EyNjNjNzk4
11
+ MDM2NWQ1ZWI5OTllODUwYTQxNDZkODUxMDMzMzIyMjU3NjRhMDQ=
12
+ data.tar.gz: !binary |-
13
+ NDgxMTcyNzI1MTQyZjg2ZWNhZDJmZWMxZTlkODZiMWQ2Y2EyOTgzNWEwNjJl
14
+ OTc4YmY0NjAyNTg2ZWJmNjdmYTU3NjgxNTkxNjM4MWNlYTk1MTljNDJiZDQx
15
+ OTg1NzRhZWVmOWEyOGI2ODU2MGYxMzViMzY1NTgyYTI2ZDIzOTY=
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ *.bundle
5
+ .config
6
+ .yardoc
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2012, Spatial Networks
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are
6
+ met:
7
+
8
+ * Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+ * Redistributions in binary form must reproduce the above
11
+ copyright notice, this list of conditions and the following
12
+ disclaimer in the documentation and/or other materials provided
13
+ with the distribution.
14
+ * Neither the name of the author nor the names of other
15
+ contributors may be used to endorse or promote products derived
16
+ from this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,12 @@
1
+ all: build
2
+
3
+ build:
4
+ bundle exec rake
5
+
6
+ test:
7
+ rm -rf tmp && bundle exec rake
8
+
9
+ clean:
10
+ rm -rf tmp
11
+
12
+ .PHONY: build clean test
@@ -0,0 +1,27 @@
1
+ # filegdb-ruby [![Build Status](https://secure.travis-ci.org/spatialnetworks/filegdb-ruby.png)](http://travis-ci.org/spatialnetworks/filegdb-ruby)
2
+
3
+ Native bindings for the ESRI libFileGDBAPI library.
4
+
5
+ ## Installation
6
+
7
+ Add this to your `Gemfile`
8
+
9
+ ```rb
10
+ gem 'filegdb'
11
+ ```
12
+
13
+ OR install manually
14
+
15
+ ```sh
16
+ gem install filegdb
17
+ ```
18
+
19
+ ## Running the tests
20
+
21
+ ```sh
22
+ bundle exec rake
23
+ ```
24
+
25
+ ## License
26
+
27
+ BSD
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env rake
2
+ #
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ require 'bundler/gem_tasks'
6
+ require 'rake/testtask'
7
+ require 'rake'
8
+ require 'rake/extensiontask'
9
+ require 'rspec/core'
10
+ require 'rspec/core/rake_task'
11
+
12
+ Bundler.setup
13
+
14
+ Rake::ExtensionTask.new('filegdb') do |ext|
15
+ ext.name = 'filegdb'
16
+ ext.lib_dir = "lib/filegdb"
17
+ end
18
+
19
+ RSpec::Core::RakeTask.new(:spec) do |spec|
20
+ Rake::Task['compile'].invoke
21
+ spec.pattern = FileList['spec/**/*_spec.rb']
22
+ end
23
+
24
+ task :default => :spec
@@ -0,0 +1,126 @@
1
+ #ifndef __SHP_BASE_HPP__
2
+ #define __SHP_BASE_HPP__
3
+
4
+ #include <vector>
5
+ #include <algorithm>
6
+ #include "filegdb.hpp"
7
+
8
+ namespace filegdb {
9
+ class gc_object {
10
+ public:
11
+ virtual void mark_dependencies() = 0;
12
+ virtual void dispose() = 0;
13
+ virtual void add_dependency(gc_object *dep) = 0;
14
+ virtual void remove_dependency(gc_object *dep) = 0;
15
+ virtual void mark() = 0;
16
+ };
17
+
18
+ template <typename T> class base : public gc_object {
19
+ public:
20
+ base<T>() : _value(0), _dependencies() {}
21
+
22
+ static VALUE initialize_instance(int argc, VALUE *argv, VALUE self) {
23
+ return unwrap(self)->initialize(argc, argv);
24
+ }
25
+
26
+ static VALUE new_instance(int argc, VALUE *argv, VALUE klass) {
27
+ T *instance = new T();
28
+ VALUE rvalue = instance->wrapped();
29
+ rb_obj_call_init(rvalue, argc, argv);
30
+ return rvalue;
31
+ }
32
+
33
+ static VALUE new_instance_not_allowed(int argc, VALUE *argv, VALUE klass) {
34
+ rb_raise(rb_eRuntimeError, "You cannot use #new on this class.");
35
+ return Qnil;
36
+ }
37
+
38
+ static VALUE initialize_instance_not_allowed(int argc, VALUE *argv, VALUE klass) {
39
+ rb_raise(rb_eRuntimeError, "You cannot use #initialize on this class.");
40
+ return Qnil;
41
+ }
42
+
43
+ VALUE wrapped() {
44
+ if (!_value) {
45
+ _value = Data_Wrap_Struct(klass(), base<T>::mark_dependencies, base<T>::dispose, this);
46
+ }
47
+ return _value;
48
+ }
49
+
50
+ virtual void mark() {
51
+ if (_value) {
52
+ rb_gc_mark(_value);
53
+ }
54
+ }
55
+
56
+ virtual void mark_dependencies() {
57
+ for (typename std::vector<gc_object *>::iterator it = _dependencies.begin(); it != _dependencies.end(); ++it) {
58
+ (*it)->mark();
59
+ }
60
+ }
61
+
62
+ virtual void dispose() {}
63
+ virtual VALUE initialize(int argc, VALUE *argv) { return wrapped(); }
64
+
65
+ virtual VALUE klass() {
66
+ return Qnil;
67
+ }
68
+
69
+ virtual ~base() {}
70
+
71
+ static T *unwrap(VALUE self) {
72
+ T *obj = NULL;
73
+ Data_Get_Struct(self, T, obj);
74
+ return obj;
75
+ }
76
+
77
+ virtual std::vector<gc_object *> dependencies() {
78
+ return _dependencies;
79
+ }
80
+
81
+ virtual void add_dependency(gc_object *dep) {
82
+ _dependencies.push_back(dep);
83
+ }
84
+
85
+ virtual void remove_dependency(gc_object *dep) {
86
+ _dependencies.erase(std::remove(_dependencies.begin(), _dependencies.end(), dep), _dependencies.end());
87
+ }
88
+
89
+ protected:
90
+ VALUE _value;
91
+
92
+ std::vector<gc_object *> _dependencies;
93
+
94
+ static T *object(void *ptr) {
95
+ return static_cast<T *>(ptr);
96
+ }
97
+
98
+ static void mark_dependencies(void *ptr) {
99
+ base::object(ptr)->mark_dependencies();
100
+ }
101
+
102
+ static void dispose(void *ptr) {
103
+ delete base::object(ptr);
104
+ }
105
+
106
+ static void define(VALUE klass, bool allowNew) {
107
+ if (allowNew) {
108
+ rb_define_singleton_method(klass, "new", FGDB_METHOD(base<T>::new_instance), -1);
109
+ rb_define_method(klass, "initialize", FGDB_METHOD(base<T>::initialize_instance), -1);
110
+ }
111
+ else {
112
+ rb_define_singleton_method(klass, "new", FGDB_METHOD(base<T>::new_instance_not_allowed), -1);
113
+ rb_define_method(klass, "initialize", FGDB_METHOD(base<T>::initialize_instance_not_allowed), -1);
114
+ }
115
+ }
116
+
117
+ VALUE initialize_not_allowed()
118
+ {
119
+ rb_raise(rb_eRuntimeError, "You cannot use #new on this class.");
120
+ return Qnil;
121
+ }
122
+
123
+ };
124
+ }
125
+
126
+ #endif
@@ -0,0 +1,13 @@
1
+ require 'mkmf'
2
+
3
+ filegdb_path = File.expand_path("#{File.dirname(__FILE__)}/filegdb")
4
+
5
+ dir_config '', File.join(filegdb_path, 'include'), File.join(filegdb_path, 'lib')
6
+
7
+ have_library 'FileGDBAPI' or raise 'libFileGDBAPI not found'
8
+
9
+ $libs = append_library $libs, 'FileGDBAPI'
10
+
11
+ $LDFLAGS << " -Wl,-rpath,#{File.join(filegdb_path, 'lib')}"
12
+
13
+ create_makefile 'filegdb/filegdb'
@@ -0,0 +1,27 @@
1
+ #include "ruby.h"
2
+ #include <string>
3
+ #include <iostream>
4
+
5
+ #include "filegdb.hpp"
6
+ #include "geodatabase.hpp"
7
+ #include "table.hpp"
8
+ #include "row.hpp"
9
+ #include "shape_buffer.hpp"
10
+ #include "point_shape_buffer.hpp"
11
+ #include "multi_point_shape_buffer.hpp"
12
+ #include "point.hpp"
13
+
14
+ VALUE cFileGDB;
15
+
16
+ extern "C" {
17
+ void Init_filegdb() {
18
+ cFileGDB = rb_define_module("FileGDB");
19
+ filegdb::geodatabase::define(cFileGDB);
20
+ filegdb::table::define(cFileGDB);
21
+ filegdb::row::define(cFileGDB);
22
+ filegdb::point::define(cFileGDB);
23
+ filegdb::shape_buffer::define(cFileGDB);
24
+ filegdb::point_shape_buffer::define(cFileGDB);
25
+ filegdb::multi_point_shape_buffer::define(cFileGDB);
26
+ }
27
+ }
@@ -0,0 +1,44 @@
1
+ #ifndef __FGDB_HPP__
2
+ #define __FGDB_HPP__
3
+
4
+ #include "ruby.h"
5
+ #include <string>
6
+ #include <iostream>
7
+ #include <FileGDBAPI.h>
8
+
9
+ using namespace std;
10
+ using namespace FileGDBAPI;
11
+
12
+ typedef VALUE (*RB_INSTANCE_METHOD)(...);
13
+
14
+ #define FGDB_IS_FAILURE(hr) ((hr) != S_OK)
15
+ #define FGDB_RAISE_ERROR(hr) rb_raise(rb_eRuntimeError, fgdb_error_string(hr))
16
+ #define FGDB_FATAL(msg) rb_raise(rb_eRuntimeError, msg)
17
+ #define FGDB_FATAL_ARGUMENT(msg) rb_raise(rb_eArgError, msg)
18
+ #define FGDB_METHOD(method) ((RB_INSTANCE_METHOD)&method)
19
+
20
+ #define CHECK_ARGUMENT_STRING(arg) \
21
+ if (TYPE(arg) != T_STRING) { \
22
+ FGDB_FATAL_ARGUMENT("Argument must be a String"); \
23
+ return Qnil; \
24
+ }
25
+
26
+ #define CHECK_ARGUMENT_FIXNUM(arg) \
27
+ if (TYPE(arg) != T_FIXNUM) { \
28
+ FGDB_FATAL_ARGUMENT("Argument must be a FixNum"); \
29
+ return Qnil; \
30
+ }
31
+
32
+ #define CHECK_ARGUMENT_FLOAT(arg) \
33
+ if (TYPE(arg) != T_FLOAT) { \
34
+ FGDB_FATAL_ARGUMENT("Argument must be a Float"); \
35
+ return Qnil; \
36
+ }
37
+
38
+ std::wstring to_wstring(const char *input);
39
+ const char *to_char_array(std::wstring str);
40
+ const char *fgdb_error_string(fgdbError hr);
41
+
42
+ extern VALUE fgdb_klass;
43
+
44
+ #endif
@@ -0,0 +1,30 @@
1
+ //
2
+ // FileGDBAPI.h
3
+ //
4
+
5
+ /*
6
+ COPYRIGHT � 2012 ESRI
7
+ TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
8
+ Unpublished material - all rights reserved under the
9
+ Copyright Laws of the United States and applicable international
10
+ laws, treaties, and conventions.
11
+
12
+ For additional information, contact:
13
+ Environmental Systems Research Institute, Inc.
14
+ Attn: Contracts and Legal Services Department
15
+ 380 New York Street
16
+ Redlands, California, 92373
17
+ USA
18
+
19
+ email: contracts@esri.com
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #include "FileGDBCore.h"
25
+ #include "GeodatabaseManagement.h"
26
+ #include "Geodatabase.h"
27
+ #include "Table.h"
28
+ #include "Row.h"
29
+ #include "Util.h"
30
+ #include "Raster.h"
@@ -0,0 +1,226 @@
1
+ //
2
+ // FileGDBCore.h
3
+ //
4
+
5
+ /*
6
+ COPYRIGHT � 2012 ESRI
7
+ TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
8
+ Unpublished material - all rights reserved under the
9
+ Copyright Laws of the United States and applicable international
10
+ laws, treaties, and conventions.
11
+
12
+ For additional information, contact:
13
+ Environmental Systems Research Institute, Inc.
14
+ Attn: Contracts and Legal Services Department
15
+ 380 New York Street
16
+ Redlands, California, 92373
17
+ USA
18
+
19
+ email: contracts@esri.com
20
+ */
21
+
22
+ #pragma once
23
+
24
+ typedef unsigned char byte;
25
+ typedef int int32;
26
+ typedef unsigned int uint32;
27
+ typedef short int16;
28
+ typedef unsigned short uint16;
29
+
30
+ typedef int fgdbError;
31
+
32
+ #if !defined (SUCCEEDED)
33
+ #define SUCCEEDED(result) ((fgdbError)(result) >= 0)
34
+ #endif
35
+
36
+ #if !defined (FAILED)
37
+ #define FAILED(result) ((fgdbError)(result) < 0)
38
+ #endif
39
+
40
+ #if !defined (S_OK)
41
+ #define S_OK ((fgdbError)0x00000000)
42
+ #endif
43
+
44
+ #if !defined (S_FALSE)
45
+ #define S_FALSE ((fgdbError)0x00000001)
46
+ #endif
47
+
48
+ #if !defined (E_FAIL)
49
+ #define E_FAIL ((fgdbError)0x80004005)
50
+ #endif
51
+
52
+ #if !defined (E_INVALIDARG)
53
+ #define E_INVALIDARG ((fgdbError)0x80070057)
54
+ #endif
55
+
56
+ #if !defined (E_NOTIMPL)
57
+ #define E_NOTIMPL ((fgdbError)0x80004001)
58
+ #endif
59
+
60
+ #if !defined (E_OUTOFMEMORY)
61
+ #define E_OUTOFMEMORY ((fgdbError)0x8007000E)
62
+ #endif
63
+
64
+ #if !defined (E_POINTER)
65
+ #define E_POINTER ((fgdbError)0x80004003)
66
+ #endif
67
+
68
+ #if !defined (E_NOINTERFACE)
69
+ #define E_NOINTERFACE ((fgdbError)0x80004002)
70
+ #endif
71
+
72
+ #if !defined (E_UNEXPECTED)
73
+ #define E_UNEXPECTED ((fgdbError)0x8000FFFF)
74
+ #endif
75
+
76
+ #if !defined (E_ACCESSDENIED)
77
+ #define E_ACCESSDENIED ((fgdbError)0x80070005)
78
+ #endif
79
+
80
+ #define FGDB_E_FILE_NOT_FOUND ((fgdbError)0x80070002)
81
+ #define FGDB_E_PATH_NOT_FOUND ((fgdbError)0x80070003)
82
+ #define FGDB_E_ACCESS_DENIED ((fgdbError)0x80070005)
83
+ #define FGDB_E_CANNOT_MAKE ((fgdbError)0x80070052)
84
+ #define FGDB_E_SEEK ((fgdbError)0x80070019)
85
+ #define FGDB_E_INVALID_HANDLE ((fgdbError)0x80070006)
86
+ #define FGDB_E_FILE_EXISTS ((fgdbError)0x80070050)
87
+ #define FGDB_E_HANDLE_DISK_FULL ((fgdbError)0x80070027)
88
+
89
+ #define FGDB_E_NO_PERMISSION ((fgdbError)-2147220987)
90
+ #define FGDB_E_NOT_SUPPORTED ((fgdbError)-2147220989)
91
+ #define FGDB_E_FILE_IO ((fgdbError)-2147220975)
92
+ #define FGDB_E_FIELD_NOT_FOUND ((fgdbError)-2147219885)
93
+ #define FGDB_E_FIELD_INVALID_NAME ((fgdbError)-2147219886)
94
+ #define FGDB_E_FIELD_NOT_NULLABLE ((fgdbError)-2147219879)
95
+ #define FGDB_E_FIELD_NOT_EDITABLE ((fgdbError)-2147219880)
96
+ #define FGDB_E_FIELD_INVALID_TYPE ((fgdbError)-2147219883)
97
+ #define FGDB_E_FIELD_ALREADY_EXISTS ((fgdbError)-2147219884)
98
+ #define FGDB_E_FIELDS_MULTIPLE_OIDS ((fgdbError)-2147219707)
99
+ #define FGDB_E_FIELDS_MULTIPLE_GEOMETRIES ((fgdbError)-2147219706)
100
+ #define FGDB_E_FIELDS_MULTIPLE_RASTERS ((fgdbError)-2147219704)
101
+ #define FGDB_E_FIELDS_MULTIPLE_GLOBALIDS ((fgdbError)-2147219703)
102
+ #define FGDB_E_FIELDS_EMPTY ((fgdbError)-2147219702)
103
+ #define FGDB_E_FIELD_CANNOT_DELETE_REQUIRED_FIELD ((fgdbError)-2147219877)
104
+ #define FGDB_E_TABLE_INVALID_NAME ((fgdbError)-2147220654)
105
+ #define FGDB_E_TABLE_NOT_FOUND ((fgdbError)-2147220655)
106
+ #define FGDB_E_TABLE_ALREADY_EXISTS ((fgdbError)-2147220653)
107
+ #define FGDB_E_TABLE_NO_OID_FIELD ((fgdbError)-2147220652)
108
+ #define FGDB_E_DATASET_INVALID_NAME ((fgdbError)-2147220734)
109
+ #define FGDB_E_DATASET_ALREADY_EXISTS ((fgdbError)-2147220733)
110
+ #define FGDB_E_INDEX_NOT_FOUND ((fgdbError)-2147219629)
111
+ #define FGDB_E_GRID_SIZE_TOO_SMALL ((fgdbError)-2147216881)
112
+ #define FGDB_E_INVALID_GRID_SIZE ((fgdbError)-2147216894)
113
+ #define FGDB_E_NO_SPATIALREF ((fgdbError)-2147216889)
114
+ #define FGDB_E_INVALID_SQL ((fgdbError)-2147220985)
115
+ #define FGDB_E_XML_PARSE_ERROR ((fgdbError)-2147215103)
116
+ #define FGDB_E_SPATIALFILTER_INVALID_GEOMETRY ((fgdbError)-2147216814)
117
+ #define FGDB_E_SPATIALREF_INVALID ((fgdbError)-2147216892)
118
+ #define FGDB_E_WORKSPACE_ALREADY_EXISTS ((fgdbError)-2147220902)
119
+ #define FGDB_E_INVALID_RELEASE ((fgdbError)-2147220965)
120
+ #define FGDB_E_LOCK_CONFLICT ((fgdbError)-2147220947)
121
+ #define FGDB_E_SCHEMA_LOCK_CONFLICT ((fgdbError)-2147220970)
122
+ #define FGDB_E_OBJECT_NOT_LOCKED ((fgdbError)-2147220968)
123
+ #define FGDB_E_WORKSPACE_READONLY ((fgdbError)-2147220893)
124
+ #define FGDB_E_CANNOT_EDIT_COMPRESSED_DATASET ((fgdbError)-2147220113)
125
+ #define FGDB_E_CANNOT_UPDATE_COMPRESSED_DATASET ((fgdbError)-2147220112)
126
+ #define FGDB_E_COMPRESSED_DATASET_NOT_INSTALLED ((fgdbError)-2147220109)
127
+ #define FGDB_E_NEGATIVE_FID ((fgdbError)-2147220945)
128
+ #define FGDB_E_FEATURE_VALUE_TYPE_MISMATCH ((fgdbError)-2147217395)
129
+ #define FGDB_E_ROW_BAD_VALUE ((fgdbError)-2147219115)
130
+ #define FGDB_E_ROW_ALREADY_EXISTS ((fgdbError)-2147219114)
131
+ #define FGDB_E_ROW_NOT_FOUND ((fgdbError)-2147219118)
132
+ #define FGDB_E_TABLE_SIZE_EXCEEDED ((fgdbError)-2147220951)
133
+ #define FGDB_E_NOT_EDITING ((fgdbError)-2147220134)
134
+ #define FGDB_E_EDIT_OPERATION_REQUIRED ((fgdbError)-2147220957)
135
+ #define FGDB_E_CANNOT_CHANGE_ITEM_VISIBILITY ((fgdbError)-2147211770)
136
+ #define FGDB_E_ITEM_NOT_FOUND ((fgdbError)-2147211775)
137
+ #define FGDB_E_ITEM_RELATIONSHIP_NOT_FOUND ((fgdbError)-2147211762)
138
+ #define FGDB_E_DOMAIN_NOT_FOUND ((fgdbError)-2147209215)
139
+ #define FGDB_E_DOMAIN_NAME_ALREADY_EXISTS ((fgdbError)-2147209212)
140
+ #define FGDB_E_DOMAIN_INVALID_NAME ((fgdbError)-2147209194)
141
+
142
+ namespace FileGDBAPI
143
+ {
144
+
145
+ enum FieldType
146
+ {
147
+ fieldTypeSmallInteger = 0,
148
+ fieldTypeInteger = 1,
149
+ fieldTypeSingle = 2,
150
+ fieldTypeDouble = 3,
151
+ fieldTypeString = 4,
152
+ fieldTypeDate = 5,
153
+ fieldTypeOID = 6,
154
+ fieldTypeGeometry = 7,
155
+ fieldTypeBlob = 8,
156
+ fieldTypeRaster = 9,
157
+ fieldTypeGUID = 10,
158
+ fieldTypeGlobalID = 11,
159
+ fieldTypeXML = 12,
160
+ };
161
+
162
+ enum ShapeType
163
+ {
164
+ shapeNull = 0,
165
+ shapePoint = 1,
166
+ shapePointM = 21,
167
+ shapePointZM = 11,
168
+ shapePointZ = 9,
169
+ shapeMultipoint = 8,
170
+ shapeMultipointM = 28,
171
+ shapeMultipointZM = 18,
172
+ shapeMultipointZ = 20,
173
+ shapePolyline = 3,
174
+ shapePolylineM = 23,
175
+ shapePolylineZM = 13,
176
+ shapePolylineZ = 10,
177
+ shapePolygon = 5,
178
+ shapePolygonM = 25,
179
+ shapePolygonZM = 15,
180
+ shapePolygonZ = 19,
181
+ shapeMultiPatchM = 31,
182
+ shapeMultiPatch = 32,
183
+ shapeGeneralPolyline = 50,
184
+ shapeGeneralPolygon = 51,
185
+ shapeGeneralPoint = 52,
186
+ shapeGeneralMultipoint = 53,
187
+ shapeGeneralMultiPatch = 54,
188
+ };
189
+
190
+ enum ShapeModifiers
191
+ {
192
+ shapeHasZs = (-2147483647 - 1),
193
+ shapeHasMs = 1073741824,
194
+ shapeHasCurves = 536870912,
195
+ shapeHasIDs = 268435456,
196
+ shapeHasNormals = 134217728,
197
+ shapeHasTextures = 67108864,
198
+ shapeHasPartIDs = 33554432,
199
+ shapeHasMaterials = 16777216,
200
+ shapeIsCompressed = 8388608,
201
+ shapeModifierMask = -16777216,
202
+ shapeMultiPatchModifierMask = 15728640,
203
+ shapeBasicTypeMask = 255,
204
+ shapeBasicModifierMask = -1073741824,
205
+ shapeNonBasicModifierMask = 1056964608,
206
+ shapeExtendedModifierMask = -587202560
207
+ };
208
+
209
+ enum GeometryType
210
+ {
211
+ geometryNull = 0,
212
+ geometryPoint = 1,
213
+ geometryMultipoint = 2,
214
+ geometryPolyline = 3,
215
+ geometryPolygon = 4,
216
+ geometryMultiPatch = 9,
217
+ };
218
+
219
+ enum CurveType
220
+ {
221
+ curveTypeCircularArc = 1,
222
+ curveTypeBezier = 4,
223
+ curveTypeEllipticArc = 5,
224
+ };
225
+
226
+ }; // namespace FileGDBAPI