geoai 0.0.7 → 1.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,39 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to the @geobase.js/geoai project will be documented in this file.
3
+ All notable changes to the geoai project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.0-rc.1] - 2024-01-XX
9
+
10
+ ### Release Candidate
11
+ This is the first release candidate for version 1.0.0. This RC includes all the features and improvements planned for the final 1.0.0 release.
12
+
13
+ ## [1.0.0-rc.2] - 2025-01-XX
14
+
15
+ ### Release Candidate
16
+ - Bug fixes and improvements
17
+ - Minor documentation updates and example references to the new RC version.
18
+ - Internal release scripts updated to support rc.2 flow.
19
+ - No functional changes to the library API.
20
+
21
+ ## [1.0.0] - 2024-01-XX
22
+
23
+ ### Changed
24
+ - **BREAKING**: Renamed package from `geoai-js` to `geoai`
25
+ - Updated all import statements and package references
26
+ - Updated build output structure from `geoai-js.js` to `geoai.js`
27
+ - Updated documentation and examples
28
+ - Updated repository URLs and homepage
29
+
30
+ ### Migration Guide
31
+ To migrate from the old package:
32
+ 1. Update your package.json: `"geoai-js": "^0.0.7"` → `"geoai": "^1.0.0"`
33
+ 2. Update all import statements: `import { geoai } from "geoai"` → `import { geoai } from "geoai"`
34
+ 3. Update any build configurations that reference the old package name
35
+ 4. Update any documentation or scripts that reference the old package
36
+
8
37
  ## [0.0.7] - 2024-12-19
9
38
 
10
39
  ### Fixed
@@ -27,7 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
27
56
 
28
57
  ### Added
29
58
 
30
- - Initial public release of @geobase.js/geoai
59
+ - Initial public release of geoai
31
60
  - Support for multiple Geo AI models:
32
61
  - Object Detection
33
62
  - Building Footprint Segmentation
package/LICENSE.md CHANGED
@@ -1,9 +1,9 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Kamil Bysiec
3
+ Copyright (c) 2025 SpacialDB UG (Decision Labs)
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
7
7
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
8
 
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,26 +1,67 @@
1
- [![Main](https://github.com/decision-labs/geobase.js/actions/workflows/main.yml/badge.svg)](https://github.com/decision-labs/geobase.js/actions/workflows/main.yml)
1
+ <h1 align="center">
2
+ GeoAI <img src="https://cdn-icons-png.flaticon.com/256/5968/5968292.png" alt="JavaScript logo" height="24" style="vertical-align:middle" />
3
+ </h1>
2
4
 
3
- # `@geobase.js/geoai`
5
+ <p align="center" style="margin-top:8px;">A lightweight JavaScript library for running Geo AI models in frontend applications.</p>
4
6
 
5
- A Javascript library for running Geo AI models in frontend applications.
7
+ <p align="center" style="margin:12px 0;">
8
+ <a href="https://www.npmjs.com/package/geoai"><img alt="npm version" src="https://img.shields.io/npm/v/geoai.svg"></a>
9
+ <a href="https://github.com/decision-labs/geoai.js/actions/workflows/main.yml" style="margin-left:6px"><img alt="main" src="https://github.com/decision-labs/geoai.js/actions/workflows/main.yml/badge.svg"></a>
10
+ <a href="https://www.npmjs.com/package/geoai" style="margin-left:6px"><img alt="npm downloads" src="https://img.shields.io/npm/dm/geoai.svg"></a>
11
+ <a href="https://docs.geobase.app/geoai" style="margin-left:6px"><img alt="docs" src="https://img.shields.io/badge/docs-online-blue"></a>
12
+ </p>
6
13
 
7
- ## Installation
14
+ <div align="center" style="margin: 20px 0;">
15
+ <div style="border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); overflow: hidden; display: inline-block; border: 2px solid white;">
16
+ <video width="120%" max-width="1200px" autoplay muted loop style="display: block; object-fit: cover; object-position: center;">
17
+ <source src="https://docs.geobase.app/geoai-live/video/image-feature-extraction-sm.mp4" type="video/mp4">
18
+ Your browser does not support the video tag.
19
+ </video>
20
+ </div>
21
+ </div>
22
+
23
+ ### Quick install
24
+
25
+ ### NPM Package
26
+
27
+ [![npm version](https://img.shields.io/npm/v/geoai.svg)](https://www.npmjs.com/package/geoai)
28
+ [![npm downloads](https://img.shields.io/npm/dm/geoai.svg)](https://www.npmjs.com/package/geoai)
8
29
 
9
30
  ```bash
10
- npm install @geobase.js/geoai
31
+ npm i geoai
32
+ ```
33
+
34
+ 📦 **Package Links:**
35
+ - [npm package](https://www.npmjs.com/package/geoai)
36
+ - [jsDelivr CDN](https://www.jsdelivr.com/package/npm/geoai)
37
+
38
+ ### CDN (Browser)
39
+
40
+ You can also use GeoAI directly in the browser via CDN:
41
+
42
+ #### Unpkg CDN
43
+ ```html
44
+ <script src="https://unpkg.com/geoai@1.0.0-rc.2/geoai.js"></script>
45
+ ```
46
+
47
+ #### jsDelivr CDN
48
+ ```html
49
+ <script src="https://cdn.jsdelivr.net/npm/geoai@1.0.0-rc.2/geoai.min.js"></script>
11
50
  ```
12
51
 
52
+ When using CDN, the library is available globally as `geoai`.
53
+
13
54
  ## Usage
14
55
 
15
56
  ### Core Library (Node.js and Browser)
16
57
 
58
+ #### NPM Installation
17
59
  ```javascript
18
- import { geoai } from "@geobase.js/geoai";
60
+ import { geoai } from "geoai";
19
61
 
20
- // Initialize the pipeline
62
+ // Initialize the pipeline with ESRI provider (no API key required)
21
63
  const pipeline = await geoai.pipeline([{ task: "object-detection" }], {
22
- provider: "geobase",
23
- apikey: "your-api-key",
64
+ provider: "esri",
24
65
  });
25
66
 
26
67
  // Run inference
@@ -34,34 +75,90 @@ const result = await pipeline.inference({
34
75
  });
35
76
  ```
36
77
 
37
- ## Architecture
78
+ #### CDN Usage
79
+ ```javascript
80
+ // When using CDN, geoai is available globally
81
+ const pipeline = await geoai.pipeline([{ task: "object-detection" }], {
82
+ provider: "esri",
83
+ });
38
84
 
39
- - **Core Module** (`@geobase.js/geoai`): Pure Javascript/TypeScript library that works in both Node.js and browser environments
85
+ const result = await pipeline.inference({
86
+ inputs: {
87
+ polygon: geoJsonFeature,
88
+ },
89
+ mapSourceParams: {
90
+ zoomLevel: 18,
91
+ },
92
+ });
93
+ ```
40
94
 
41
- ## API Reference
95
+ ### React Hooks
42
96
 
43
- ### Core API
97
+ ```javascript
98
+ import { useGeoAIWorker } from "geoai/react";
99
+
100
+ function MyComponent() {
101
+ const { inference, isLoading, error } = useGeoAIWorker({
102
+ tasks: ["object-detection"],
103
+ provider: "esri", // No API key required for ESRI
104
+ });
105
+
106
+ const handleInference = async () => {
107
+ const result = await inference({
108
+ inputs: { polygon: geoJsonFeature },
109
+ mapSourceParams: { zoomLevel: 18 },
110
+ });
111
+ };
112
+
113
+ return (
114
+ <div>
115
+ <button onClick={handleInference} disabled={isLoading}>
116
+ {isLoading ? "Processing..." : "Run Detection"}
117
+ </button>
118
+ {error && <div>Error: {error.message}</div>}
119
+ </div>
120
+ );
121
+ }
122
+ ```
44
123
 
45
- - `geoai.pipeline(tasks, config)` - Initialize a pipeline with tasks
46
- - `pipeline.inference(params)` - Run inference with the pipeline
124
+ ## Features
47
125
 
126
+ - **Multiple AI Tasks**: Object detection, segmentation, classification, and more
127
+ - **Map Provider Support**: Geobase, Mapbox, ESRI, and Google Maps
128
+ - **React Integration**: Hooks for easy React integration
129
+ - **TypeScript Support**: Full TypeScript definitions
130
+ - **Web Worker Support**: Run AI models in background threads
131
+ - **Optimized Performance**: Efficient model loading and inference
132
+ - **CDN Ready**: Available via npm and popular CDNs (unpkg, jsDelivr)
48
133
 
49
134
  ## Supported Tasks
50
135
 
51
136
  - Object Detection
52
- - Building Footprint Segmentation
53
- - Land Cover Classification
54
- - Zero-shot Object Detection
55
- - Oriented Object Detection
56
- - Oil Storage Tank Detection
137
+ - Building Detection
138
+ - Car Detection
57
139
  - Ship Detection
58
140
  - Solar Panel Detection
141
+ - Oil Storage Tank Detection
142
+ - Land Cover Classification
59
143
  - Wetland Segmentation
144
+ - Building Footprint Segmentation
60
145
  - Mask Generation
61
- - Car-Detection
146
+ - Zero-shot Object Detection
147
+ - Zero-shot Segmentation
148
+ - Image Feature Extraction
149
+
150
+ For more see the [supported tasks](https://docs.geobase.app/geoai/supported-tasks)
151
+
152
+ ## Documentation
153
+
154
+ Visit [docs.geobase.app/geoai](https://docs.geobase.app/geoai) for comprehensive documentation, examples, and API reference.
155
+
156
+ ## Contributing
157
+
158
+ We welcome contributions! Please see our [contributing guide](CONTRIBUTING.md) for details.
62
159
 
63
160
  ## License
64
161
 
65
- MIT
162
+ MIT License - see [LICENSE.md](LICENSE.md) for details.
66
163
 
67
- ~~togglebuild~~
164
+ [//]: <> (Toggle CI on)