strapi-plugin-postgis
strapi-plugin-postgis copied to clipboard
Invalid geometry on save
Hi, I'm testing this plugin but when i try to save any point in the map i get an API error of invalid geometry.
strapi version: 4.2.2 (node v16.15.1) plugin version: 0.1.5
GeoJSON generated by your plugin is :
{
"type":"Point","coordinates":[-115.224609,64.125789]
}
my schema .json has this attributes:
"attributes": {
"description": {
"type": "string"
},
"geom": {
"columnType": {
"type": "specificType",
"args": [
"geometry(POINT,4326)"
]
},
"type": "json",
"fieldRenderer": "postgis"
}
}
and error reported is:
[2022-07-06 18:02:01.475] error: insert into "public"."reports" ("created_at", "created_by_id", "description", "geom", "published_at", "updated_at", "updated_by_id") values ($1, $2, $3, $4, $5, $6, $7) returning "id" - parse error - invalid geometry
error: insert into "public"."reports" ("created_at", "created_by_id", "description", "geom", "published_at", "updated_at", "updated_by_id") values ($1, $2, $3, $4, $5, $6, $7) returning "id" - parse error - invalid geometry
at Parser.parseErrorMessage (c:\*************************\node_modules\pg-protocol\dist\parser.js:287:98)
at Parser.handlePacket (c:\*************************\node_modules\pg-protocol\dist\parser.js:126:29)
at Parser.parse (c:\*************************\node_modules\pg-protocol\dist\parser.js:39:38)
at Socket.<anonymous> (c:\*************************\node_modules\pg-protocol\dist\index.js:11:42)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:467:12)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Socket.Readable.push (internal/streams/readable.js:223:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)