• Hello,

    I am using your ACF geometa plugin to store a polygon in the post meta table. This used to work just fine, but now it appears that the geometry type value being stored in the _geo table does not match the geometry type in the geojson stored in the post meta table: Polygon is being store as Multipolygon which breaks my ST_Intersects query:

    Post meta:

    meta_id post_id meta_key meta_value
    27355 4382 delivery_area {“type”:”FeatureCollection”,”features”:[{“type”:”Feature”,”properties”:{},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-478.490295,33.550337],[-478.490295,34.05017],[-477.454834,34.05017],[-477.454834,33.550337],[-478.490295,33.550337]]]}}]}
    28282 4384 delivery_area {“type”:”FeatureCollection”,”features”:[{“type”:”Feature”,”properties”:{},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-98.02276611328126,29.572150707406806],[-98.29605102539062,29.466988917717806],[-98.23974609375001,29.367702183906086],[-98.10997009277345,29.355191011573528],[-97.9541015625,29.407189249600243],[-98.02276611328126,29.572150707406806]]]}}]}
    28371 4385 delivery_area {“type”:”FeatureCollection”,”features”:[{“type”:”Feature”,”properties”:{},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-98.02276611328126,29.572150707406806],[-98.29605102539062,29.466988917717806],[-98.23974609375001,29.367702183906086],[-98.10997009277345,29.355191011573528],[-97.9541015625,29.407189249600243],[-98.02276611328126,29.572150707406806]]]}}]}

    _Geo

    Modify meta_id post_id fk_meta_id meta_key meta_value
    edit 11 4382 27355 delivery_area MULTIPOLYGON(((-478.490295 33.550337,-478.490295 34.05017,-477.454834 34.05017,-477.454834 33.550337…
    edit 12 4384 28282 delivery_area MULTIPOLYGON(((-98.022766113281 29.572150707407,-98.296051025391 29.466988917718,-98.23974609375 29….
    edit 13 4385 28371 delivery_area MULTIPOLYGON(((-98.022766113281 29.572150707407,-98.296051025391 29.466988917718,-98.23974609375 29….
    (3 rows) whole result

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter terrelltechsup

    (@terrelltechsup)

    Figured out what the deal is and it is an issue with how the ACF plugin stores a drawn object if you dont use the centered version of the map and only affects longitude. If you use the wrapped part of the map you will go outside the bounds of the sphere and it will be 360 degrees added to the actual longitude. I am not sure if this is an issue with the geometa library or the ACF map part of the plugin. Any comments would be appreciated.

    Plugin Author Michael Moore

    (@stuporglue)

    Hi @terrelltechsup,

    This is an issue with how Leaflet handles wrapping at the edges. I’ve created an issue on GitHub here: https://github.com/BrilliantPlugins/geometa-acf/issues/7 and will address this in the next release.

    Thanks for figuring out the issue and for reporting it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Geo Table does not match Post Meta Table’ is closed to new replies.