Skip to content

Support for geometry #2839

Open

Activity

  1. added
    type: feature
    on Jan 5, 2015
  2. mickhansen commented on Jan 5, 2015

    @mickhansen
    Contributor

    #1445 related.

  3. mickhansen commented on Jan 5, 2015

    @mickhansen
    Contributor

    @milovanderlinden Mind summizing how each type is defined in each dialect. (unless 'Point' etc literally works in all of them)

  4. milovanderlinden commented on Jan 5, 2015

    @milovanderlinden
    Author

    @mickhansen unfortunatly not :-(
    The key concept is of course X and Y, but also a projection identifier for the more advanced databases. If in the first installment, we assume geometry to always be latitude and longitude and 2D, this are the constructors.

    POINT constructors:

    • postgis:
      ST_PointmFromText('POINT(-71.064544 42.28787)',4326);
    • spatialite:
      ST_PointFromText('POINT(-71.064544 42.28787)',4326);
    • mysql:*
      Point(-71.064544, 42.28787);
    • mariadb:*
      Point(-71.064544, 42.28787);
    • mssql:
      geometry::STGeomFromText('POINT (-71.064544 42.28787)', 4326);

    Note: mysql and mariadb do not support projections, also mind the , in the constructor!

  5. milovanderlinden commented on Jan 5, 2015

    @milovanderlinden
    Author

    I would like to help out myself. Are there any instructions on which files in sequelize need to be touched when constructing a new datatype?

  6. mickhansen commented on Jan 5, 2015

    @mickhansen
    Contributor

    @milovanderlinden you can help out by providing the syntax for all of them :)
    Unfortuneatly we don't have a good system in place for how data types should work in different dialects (we use some wonky replaces right now)

  7. ptmt commented on Jan 10, 2015

    @ptmt

    +1

    Fow now, I use DataTypes.STRING to be able to display the point on the client, though changing is available with simple raw query like this 'UPDATE some_table SET geo = POINT(:lat, :lng)

  8. Pana commented on Mar 16, 2015

    @Pana

    +1

  9. rafaelveloso commented on Mar 16, 2015

    @rafaelveloso

    +1

  10. nford commented on Mar 21, 2015

    @nford

    +1

  11. johnraber commented on Mar 24, 2015

    @johnraber

    +1

  12. mickhansen commented on Mar 24, 2015

    @mickhansen
    Contributor

    @milovanderlinden is the projection required or optional? Is it important?

  13. paulxtiseo commented on Mar 24, 2015

    @paulxtiseo

    @mickhansen: projection is critical to accuracy of calculations with geographic data (but not geometry data), but not mandatory and not supported by some databases (ex: MySQL). Thus, it would have to be optional in Sequelize.

  14. mickhansen commented on Mar 24, 2015

    @mickhansen
    Contributor

    @paulxtiseo I see so in PG you could store a POINT without a projection for geometric data and a POINT with a projection for gps/geographic data?

    Implementing the data types wouldn't be too tricky.
    But i don't currently have an API for how values would be inputted.

  15. mbroadst commented on Mar 24, 2015

    @mbroadst
    Contributor

    @mickhansen it's worth mentioning that @theverything has written this which might be a good start for a unified geo types module in sequelize

  16. 53 remaining items

  17. stale commented on Jul 23, 2019

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂

  18. papb commented on Jul 31, 2019

    @papb
    Member

    What is the current status on this? I am confused.

    GEOMETRY seems already supported for PostgreSQL, MySQL and MariaDB. So is this issue just a feature request for SQLite and MSSQL? Or am I missing something?

  19. added
    dialect: mssql
    dialect: sqlite
    status: awaiting response
    on Jul 31, 2019
  20. Akila1928 commented on Aug 27, 2019

    @Akila1928

    Does sequelize support MSSQL geometry?

  21. papb commented on Aug 27, 2019

    @papb
    Member

    @Akila1928 I should know, but I don't... Would you be willing to perform a quick test and let me know?

  22. CompuTecMJS commented on Feb 4, 2020

    @CompuTecMJS

    Sigue siendo un problema
    @pensierinmusicadid, did you get to solve that problem bro ?, I also have that problem

  23. pensierinmusica commented on Feb 17, 2020

    @pensierinmusica
    Contributor

    @CompuTecMJS I ended up using a raw query.

  24. seonglae commented on Dec 18, 2020

    @seonglae

    wkx module in sequelize does not support POINTZ , LINESTRINGZ , POLYGONZ so sequelize can't accept Z data with error

    invalid GeoJson representation
    
  25. imdkbj commented on Mar 5, 2021

    @imdkbj

    5 years and still no support for mssql.

  26. added theissue type on Mar 9, 2025
  27. removed
    type: feature
    on Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dialect: mssqldialect: sqlitestatus: awaiting response

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions