<html style="direction: ltr;">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true" style="direction: ltr;"
    bgcolor="#FFFFFF" text="#000000">
    <p>I am trying to import some geopackage files. Some are polygons,
      and one is a points vector. The polygons import fine, but the
      point vector fails with:</p>
    <p>ERROR: Detected different projections of input layers. Input
      layers must be<br>
             imported separately.</p>
    <p><br>
    </p>
    <p>Then if I convert the gpkg to a shapefile, it works fine.</p>
    <p><br>
    </p>
    <p>Any ideas what could be wrong? Here's the procedure, showing the
      problem.</p>
    <p><br>
    </p>
    <p><tt>######################</tt></p>
    <p><tt># My Location/mapset info:</tt><tt><br>
      </tt></p>
    <p><tt>######################</tt></p>
    <p><tt>micha@TP480:Ashalim$ g.version</tt></p>
    <p><tt>GRASS 7.6.0 (2019)</tt><tt><br>
      </tt><tt>micha@TP480:Ashalim$ g.proj -p</tt><tt><br>
      </tt><tt>-PROJ_INFO-------------------------------------------------</tt><tt><br>
      </tt><tt>name       : Israel 1993 / Israeli TM Grid</tt><tt><br>
      </tt><tt>ellps      : grs80</tt><tt><br>
      </tt><tt>proj       : tmerc</tt><tt><br>
      </tt><tt>lat_0      : 31.73439361111111</tt><tt><br>
      </tt><tt>lon_0      : 35.20451694444445</tt><tt><br>
      </tt><tt>k          : 1.0000067</tt><tt><br>
      </tt><tt>x_0        : 219529.584</tt><tt><br>
      </tt><tt>y_0        : 626907.39</tt><tt><br>
      </tt><tt>towgs84    : -48,55,52,0,0,0,0</tt><tt><br>
      </tt><tt>no_defs    : defined</tt><tt><br>
      </tt><tt>-PROJ_EPSG-------------------------------------------------</tt><tt><br>
      </tt><tt>epsg       : 2039</tt><tt><br>
      </tt><tt>-PROJ_UNITS------------------------------------------------</tt><tt><br>
      </tt><tt>unit       : meter</tt><tt><br>
      </tt><tt>units      : meters</tt><tt><br>
      </tt><tt>meters     : 1</tt></p>
    <p><tt><br>
      </tt></p>
    <p><tt>######################</tt></p>
    <p><tt># The polygon gpkg vector:</tt></p>
    <p><tt>######################</tt></p>
    <p><tt>micha@TP480:Ashalim$ ogrinfo ashalim_analysis.gpkg
        analysis_region</tt><tt><br>
      </tt><tt>INFO: Open of `ashalim_analysis.gpkg'</tt><tt><br>
      </tt><tt>      using driver `GPKG' successful.</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Layer name: analysis_region</tt><tt><br>
      </tt><tt>Geometry: Polygon</tt><tt><br>
      </tt><tt>Feature Count: 1</tt><tt><br>
      </tt><tt>Extent: (231234.000000, 551462.000000) - (232977.000000,
        553925.000000)</tt><tt><br>
      </tt><tt>Layer SRS WKT:</tt><tt><br>
      </tt><tt>PROJCS["Israel 1993 / Israeli TM Grid",</tt><tt><br>
      </tt><tt>    GEOGCS["Israel 1993",</tt><tt><br>
      </tt><tt>        DATUM["Israel_1993",</tt></p>
    <p><tt>.....</tt></p>
    <p><tt><br>
      </tt></p>
    <p><tt># and import to GRASS:</tt><tt><br>
      </tt></p>
    <p><tt>micha@TP480:Ashalim$ v.import ashalim_analysis.gpkg
        output=ashalim_region --o</tt><tt><br>
      </tt><tt>Check if OGR layer <analysis_region> contains
        polygons...</tt><tt><br>
      </tt><tt> 100%</tt><tt><br>
      </tt><tt>Creating attribute table for layer
        <analysis_region>...</tt><tt><br>
      </tt><tt>Importing 1 features (OGR layer
        <analysis_region>)...</tt><tt><br>
      </tt><tt> 100%</tt><tt><br>
      </tt><tt>-----------------------------------------------------</tt><tt><br>
      </tt><tt>.....</tt></p>
    <p><tt>Input <ashalim_analysis.gpkg> successfully imported
        without reprojection</tt><tt><br>
      </tt></p>
    <p><tt><br>
      </tt></p>
    <p><tt>######################</tt></p>
    <p><tt># Now The point gpkg vector:</tt></p>
    <p><tt>######################</tt></p>
    <p><tt>micha@TP480:Ashalim$ ogrinfo ashalim_train_pts.gpkg
        ashalim_train_pts</tt><tt><br>
      </tt><tt>INFO: Open of `ashalim_train_pts.gpkg'</tt><tt><br>
      </tt><tt>      using driver `GPKG' successful.</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Layer name: ashalim_train_pts</tt><tt><br>
      </tt><tt>Geometry: Point</tt><tt><br>
      </tt><tt>Feature Count: 33</tt><tt><br>
      </tt><tt>Extent: (231388.000000, 551892.000000) - (232708.000000,
        553510.000000)</tt><tt><br>
      </tt><tt>Layer SRS WKT:</tt><tt><br>
      </tt><tt>PROJCS["Israel 1993 / Israeli TM Grid",</tt><tt><br>
      </tt><tt>    GEOGCS["Israel 1993",</tt><tt><br>
      </tt><tt>        DATUM["Israel_1993",</tt><tt><br>
      </tt><tt>.....</tt></p>
    <p><tt><br>
      </tt></p>
    <p><tt># Try import</tt></p>
    <p><tt>micha@TP480:Ashalim$ v.import ashalim_train_pts.gpkg
        output=ashalim_pts --o</tt><tt><br>
      </tt><tt>ERROR: Detected different projections of input layers.
        Input layers must be</tt><tt><br>
      </tt><tt>       imported separately.</tt><tt><br>
      </tt><tt>ERROR: Detected different projections of input layers.
        Input layers must be</tt><tt><br>
      </tt><tt>       imported separately.</tt><tt><br>
      </tt><tt>ERROR: Unable to create location from OGR datasource</tt><tt><br>
      </tt><tt>       <ashalim_train_pts.gpkg></tt><tt><br>
      </tt><tt># Ooops</tt></p>
    <p><tt><br>
      </tt></p>
    <p><tt># Convert to shapefile (no reprojection)<br>
      </tt></p>
    <p><tt>micha@TP480:Ashalim$ ogr2ogr ashalim_train_pts
        ashalim_train_pts.gpkg</tt><tt><br>
      </tt></p>
    <p><tt>micha@TP480:Ashalim$ ll ashalim_train_pts/</tt><tt><br>
      </tt><tt>total 32</tt><tt><br>
      </tt><tt>drwxr-xr-x 2 micha micha 4096 Jun 26 17:41 .</tt><tt><br>
      </tt><tt>drwxrwxrwx 3 micha micha 4096 Jun 26 17:41 ..</tt><tt><br>
      </tt><tt>-rw-r--r-- 1 micha micha 1320 Jun 26 17:53
        ashalim_train_pts.dbf</tt><tt><br>
      </tt><tt>-rw-r--r-- 1 micha micha  442 Jun 26 17:41
        ashalim_train_pts.prj</tt><tt><br>
      </tt><tt>-rw-r--r-- 1 micha micha 1948 Jun 26 17:53
        ashalim_train_pts.shp</tt><tt><br>
      </tt><tt>-rw-r--r-- 1 micha micha  628 Jun 26 17:53
        ashalim_train_pts.shx</tt><tt><br>
      </tt><tt>-rw-r--r-- 1 micha micha 6292 Jun 26 17:53
        layer_styles.dbf</tt><tt><br>
      </tt><tt># Now import the shape:</tt></p>
    <p><tt>micha@TP480:Ashalim$ v.import
        input=ashalim_train_pts/ashalim_train_pts.shp output=ashalim_pts
        --o</tt><tt><br>
      </tt><tt>Check if OGR layer <ashalim_train_pts> contains
        polygons...</tt><tt><br>
      </tt><tt> 100%</tt><tt><br>
      </tt><tt>Creating attribute table for layer
        <ashalim_train_pts>...</tt><tt><br>
      </tt><tt>Importing 66 features (OGR layer
        <ashalim_train_pts>)...</tt><tt><br>
      </tt><tt> 100%</tt><tt><br>
      </tt><tt>-----------------------------------------------------</tt><tt><br>
      </tt><tt>Building topology for vector map
        <ashalim_pts@OBIA>...</tt><tt><br>
      </tt><tt>Registering primitives...</tt><tt><br>
      </tt><tt>Input <ashalim_train_pts/ashalim_train_pts.shp>
        successfully imported</tt><tt><br>
      </tt><tt>without reprojection</tt></p>
    <p><br>
    </p>
    <p> <br>
    </p>
    <p>If anyone wants the point and polygon gpkg files to test, I can
      share it.</p>
    <p>Thanks</p>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
  </body>
</html>