Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/gis

Package Overview
Dependencies
Maintainers
8
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/gis

Helpers for GIS category data

  • 4.3.0-alpha.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
8
Created

What is @loaders.gl/gis?

@loaders.gl/gis is a part of the loaders.gl suite, designed to handle geospatial data. It provides utilities for parsing, transforming, and working with various geospatial data formats, making it easier to integrate and manipulate GIS data in web applications.

What are @loaders.gl/gis's main functionalities?

Parsing GeoJSON

This feature allows you to parse GeoJSON data into a JavaScript object. The code sample demonstrates how to use the `parse` function to convert a GeoJSON string into a usable object.

const { parse } = require('@loaders.gl/gis');
const geojson = '{"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Point", "coordinates": [102.0, 0.5]}, "properties": {"prop0": "value0"}}]}';
const parsedData = parse(geojson, { mimeType: 'application/json' });
console.log(parsedData);

Transforming Coordinates

This feature allows you to transform coordinates from one spatial reference system to another. The code sample shows how to transform coordinates from EPSG:4326 to EPSG:3857.

const { transform } = require('@loaders.gl/gis');
const coordinates = [102.0, 0.5];
const transformedCoordinates = transform(coordinates, 'EPSG:4326', 'EPSG:3857');
console.log(transformedCoordinates);

Handling Shapefiles

This feature allows you to load and parse shapefiles. The code sample demonstrates how to use the `load` function with the `ShapefileLoader` to load a shapefile from a URL.

const { load } = require('@loaders.gl/core');
const { ShapefileLoader } = require('@loaders.gl/shapefile');
const url = 'path/to/shapefile.zip';
load(url, ShapefileLoader).then(data => console.log(data));

Other packages similar to @loaders.gl/gis

Keywords

FAQs

Package last updated on 01 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc