
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
@kartotherian/postgis-vt-util
Advanced tools
postgres helper functions for making vector tiles in Mapbox Studio
Given the !scale_denominator! mapnik token, returns a zoom level. Lets you to control at which zoom levels features appear.
Arguments: !scale_denominator! [mapnik token]
Example:
( SELECT
some, attributes,
geom_generalized
FROM your_table
where z(!scale_denominator!) in (10,11,12)
union ALL
SELECT
some, attributes,
geom_not_generalized
FROM your_table
where z(!scale_denominator!) >= 13
) as data
De-duplicates features based on a given grid size, letting you control feature density. All features are snapped to a grid, but only 1 feature per grid cell is returend when selecting DISTINCT ON the labelgrid function.
Arguments: geometry [geometry], grid size [an integer that divides evenly into 256], !pixel_width! [mapnik token]
Example:
( SELECT
disctinct on(labelgrid(geom, 128, !pixel_width!))
some, other, attributes
FROM your_table
) AS data
Select only those line geometries long enough to be labeled; drops all line geometries too short for mapnik to place a label. Linelabel compares line length to the length of a user-supplied label field.
Arguments: zoom [integer], label [text field], geometry [geometry]
Example:
( SELECT
name, geom
FROM your_table
WHERE linelabel(z(!scale_denominator!), name, geom)
) AS data
Wrapper for ST_Buffer that adjusts distance by latitude to approximate real-world measurements. Assumes input geometries are Web Mercator and input distances are real-world meters. Accuracy decreases for larger buffer distances and at extreme latitudes.
Arguments: geometry [geometry], distance in meters [numeric]
Wrapper for ST_DWithin that adjusts distance by latitude to approximate real-world measurements. Assumes input geometries are Web Mercator and input distances are real-world meters. Accuracy decreases for larger distances and at extreme latitudes.
Arguments: geometry a [geometry], geometry b [geometry], distance in meters [numeric]
Wrapper for ST_Length that adjusts distance by latitude to approximate real-world measurements. Assumes input geometries are Web Mercator. Accuracy decreases for larger y-axis ranges of the input.
Arguments: geometry [geometry]
Given a Web Mercator tile ID as (z, x, y), returns a bounding-box geometry of the area covered by that tile.
Arguments: zoom_level [integer], x_tile [integer], y_tile [integer]
FAQs
PostGIS helper functions for making vector tiles
We found that @kartotherian/postgis-vt-util demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

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.

Research
/Security News
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.