0

My software produce WKT and I'm trying to import it into an ODBC connected Geopackage:

SELECT load_extension('mod_spatialite');

SELECT IsValidGPB(
    AsGPB (
        ST_GeomFromText('POLYGON((  318830.663 301484.952 18.120,
                                    318821.415 301490.594 18.405,
                                    318814.969 301480.037 18.489,
                                    318824.223 301474.375 18.132,
                                    318830.663 301484.952 18.120))'
                        , 3163
        )
    )
) AS "IsValid?";

Result: 0

Is there a trick to make a valid GPB geom?

  • Wow, it works in 2D... – aurel_nc Mar 23 '18 at 5:34
  • If SpatiaLite does not consider the geopackage geometry that it just created as valid there must be a bug. Make sure that you use the most recent version and if issue still happens write mail to SpatiaLite users forum. – user30184 Mar 23 '18 at 7:59
1

So in 2D, the result is 1...

SELECT IsValidGPB(
    AsGPB (
        ST_GeomFromText('POLYGON((318830.663 301484.952,318821.415 301490.594,318814.969 301480.037 ,318824.223 301474.375,318830.663 301484.952 ))', 3163)
    )
) AS "IsValid?";
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.