@dunguel/expo-geo-parser 0.5.0 → 0.5.1
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.
|
@@ -6,42 +6,17 @@ export type File = {
|
|
|
6
6
|
type: GeoFileType;
|
|
7
7
|
uti?: string | null;
|
|
8
8
|
};
|
|
9
|
-
export type Position = number[];
|
|
10
|
-
export type Point = {
|
|
11
|
-
type: "Point";
|
|
12
|
-
coordinates: Position;
|
|
13
|
-
};
|
|
14
|
-
export type LineString = {
|
|
15
|
-
type: "LineString";
|
|
16
|
-
coordinates: Position[];
|
|
17
|
-
};
|
|
18
|
-
export type Polygon = {
|
|
19
|
-
type: "Polygon";
|
|
20
|
-
coordinates: Position[][];
|
|
21
|
-
};
|
|
22
|
-
export type MultiPoint = {
|
|
23
|
-
type: "MultiPoint";
|
|
24
|
-
coordinates: Position[];
|
|
25
|
-
};
|
|
26
|
-
export type MultiLineString = {
|
|
27
|
-
type: "MultiLineString";
|
|
28
|
-
coordinates: Position[][];
|
|
29
|
-
};
|
|
30
|
-
export type MultiPolygon = {
|
|
31
|
-
type: "MultiPolygon";
|
|
32
|
-
coordinates: Position[][][];
|
|
33
|
-
};
|
|
34
|
-
export type GeometryCollection = {
|
|
35
|
-
type: "GeometryCollection";
|
|
36
|
-
geometries: Geometry[];
|
|
37
|
-
};
|
|
38
|
-
export type Geometry = Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon | GeometryCollection;
|
|
39
9
|
export type Feature = {
|
|
40
10
|
type: "Feature";
|
|
41
|
-
id?: string;
|
|
11
|
+
id?: string | number;
|
|
42
12
|
geometry: Geometry;
|
|
43
13
|
properties: Record<string, unknown>;
|
|
44
14
|
};
|
|
15
|
+
export type Geometry = {
|
|
16
|
+
type: string;
|
|
17
|
+
coordinates?: number[][];
|
|
18
|
+
geometries?: Geometry[];
|
|
19
|
+
};
|
|
45
20
|
export type FeatureCollection = {
|
|
46
21
|
type: "FeatureCollection";
|
|
47
22
|
name?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoGeoParser.types.d.ts","sourceRoot":"","sources":["../src/ExpoGeoParser.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEjF,MAAM,MAAM,IAAI,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpoGeoParser.types.d.ts","sourceRoot":"","sources":["../src/ExpoGeoParser.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEjF,MAAM,MAAM,IAAI,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoGeoParser.types.js","sourceRoot":"","sources":["../src/ExpoGeoParser.types.ts"],"names":[],"mappings":"","sourcesContent":["export type GeoFileType = \"kml\" | \"kmz\" | \"zip\" | \"geojson\" | \"json\" | \"unknown\";\n\nexport type File = {\n uri: string;\n fileName?: string | null;\n extension?: string | null;\n type: GeoFileType;\n uti?: string | null;\n};\n\
|
|
1
|
+
{"version":3,"file":"ExpoGeoParser.types.js","sourceRoot":"","sources":["../src/ExpoGeoParser.types.ts"],"names":[],"mappings":"","sourcesContent":["export type GeoFileType = \"kml\" | \"kmz\" | \"zip\" | \"geojson\" | \"json\" | \"unknown\";\n\nexport type File = {\n uri: string;\n fileName?: string | null;\n extension?: string | null;\n type: GeoFileType;\n uti?: string | null;\n};\n\nexport type Feature = {\n type: \"Feature\";\n id?: string | number;\n geometry: Geometry;\n properties: Record<string, unknown>;\n};\n\nexport type Geometry = {\n type: string;\n coordinates?: number[][];\n geometries?: Geometry[];\n};\n\nexport type FeatureCollection = {\n type: \"FeatureCollection\";\n name?: string;\n description?: string;\n sourceType?: GeoFileType;\n features: Feature[];\n};\n\nexport type ParseFeaturesEvent = {\n features: Feature[];\n isLast: boolean;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dunguel/expo-geo-parser",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A high-performance Expo native module for parsing geospatial files like KML, KMZ, and other formats, extracting polygons, markers, and spatial data efficiently on iOS and Android.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -8,61 +8,19 @@ export type File = {
|
|
|
8
8
|
uti?: string | null;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
// GeoJSON-compliant geometry types (RFC 7946)
|
|
12
|
-
|
|
13
|
-
export type Position = number[]; // [longitude, latitude, ?altitude]
|
|
14
|
-
|
|
15
|
-
export type Point = {
|
|
16
|
-
type: "Point";
|
|
17
|
-
coordinates: Position;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export type LineString = {
|
|
21
|
-
type: "LineString";
|
|
22
|
-
coordinates: Position[];
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type Polygon = {
|
|
26
|
-
type: "Polygon";
|
|
27
|
-
coordinates: Position[][];
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type MultiPoint = {
|
|
31
|
-
type: "MultiPoint";
|
|
32
|
-
coordinates: Position[];
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export type MultiLineString = {
|
|
36
|
-
type: "MultiLineString";
|
|
37
|
-
coordinates: Position[][];
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type MultiPolygon = {
|
|
41
|
-
type: "MultiPolygon";
|
|
42
|
-
coordinates: Position[][][];
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export type GeometryCollection = {
|
|
46
|
-
type: "GeometryCollection";
|
|
47
|
-
geometries: Geometry[];
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export type Geometry =
|
|
51
|
-
| Point
|
|
52
|
-
| LineString
|
|
53
|
-
| Polygon
|
|
54
|
-
| MultiPoint
|
|
55
|
-
| MultiLineString
|
|
56
|
-
| MultiPolygon
|
|
57
|
-
| GeometryCollection;
|
|
58
|
-
|
|
59
11
|
export type Feature = {
|
|
60
12
|
type: "Feature";
|
|
61
|
-
id?: string;
|
|
13
|
+
id?: string | number;
|
|
62
14
|
geometry: Geometry;
|
|
63
15
|
properties: Record<string, unknown>;
|
|
64
16
|
};
|
|
65
17
|
|
|
18
|
+
export type Geometry = {
|
|
19
|
+
type: string;
|
|
20
|
+
coordinates?: number[][];
|
|
21
|
+
geometries?: Geometry[];
|
|
22
|
+
};
|
|
23
|
+
|
|
66
24
|
export type FeatureCollection = {
|
|
67
25
|
type: "FeatureCollection";
|
|
68
26
|
name?: string;
|