Giter Site home page Giter Site logo

ehsan2003 / drizzle-postgis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from schmavery/drizzle-postgis

0.0 0.0 0.0 243 KB

A Drizzle extension/plugin to help work with PostGIS and GeoJSON

Home Page: https://schmavery.github.io/drizzle-postgis/

License: MIT License

TypeScript 100.00%

drizzle-postgis's Introduction

๐ŸŒ drizzle-postgis

A Drizzle extension/plugin to help work with PostGIS and GeoJSON


Bug report ยท Feature request ยท Read Docs



๐Ÿšธ Disclaimer

I'm a GIS beginner, please let me know if you see anything problematic in the way this library is implemented. The library is also missing support for very many functions, and test coverage exists but is not complete.

๐ŸŽ‰ Installation

pnpm add drizzle-postgis

NOTE Unfortunately drizzle-kit has a bug that causes custom types to be quoted. In order to use this with migrations, you need to apply a patch. This is the only solution until this issue is fixed! drizzle-team/drizzle-kit-mirror#350

Patching drizzle-kit

Due to a known issue with drizzle-kit, you may need to apply a patch to ensure compatibility with drizzle-postgis. Follow the steps below to patch the dependency:

Step 1: Obtain the Patch File

The patch file is located in repository under the patches directory: patches/[email protected]

You can copy the patch file content directly from the repository to you're local patches directory.

Step 2: Apply the Patch

If you're using pnpm, you can apply the patch by adding the following lines to your package.json file under the pnpm section:

  "pnpm": {
    "patchedDependencies": {
      "[email protected]": "patches/[email protected]"
    }
  }

This configuration tells pnpm to apply the specified patch to the [email protected] dependency. Note that patches/[email protected] is the path to the patch file

After updating your package.json, run pnpm install to install the patched dependency.

Alternative: Manual Patching (not recommended)

If you prefer not to modify your package.json, you can manually apply the patch using the patch command:

  1. Save the patch file content to a local file, e.g., drizzle-kit.patch.
  2. Navigate to the directory where drizzle-kit is installed (usually node_modules/drizzle-kit).
  3. Run the following command: patch -p1 < /path/to/drizzle-kit.patch

This will apply the patch to the drizzle-kit dependency.

โ“Troubleshooting

If you're having trouble with Postgres complaining that the functions can't be found, try using config.setPostGISSchema("<schema>")

There's more information about how to use these functions here: https://postgis.net/docs/reference.html

๐Ÿ“š Auto generate docs

The project is configured to auto-generate the documentation using typedoc. The documentation is generated in the docs folder.

The documentation will get generated when the code is pushed to the main branch. You can also generate the documentation locally by running the command pnpm run build:docs.

๐Ÿซฑ๐Ÿปโ€๐Ÿซฒ๐Ÿผ Contributing

Please make sure to follow the conventional commit messages format while making changes. This helps in generating changelogs and versioning the package.

๐Ÿ™ Thanks to

drizzle-postgis's People

Contributors

akashrajpurohit avatar ehsan2003 avatar findingakash avatar renovate[bot] avatar schmavery avatar zegnat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.