|     Blog    |     Wiki    |     Support

Convert ShapeFile to SQLite with New Coordinate

MapSuite Team,

I have a ShapeFileFeatureLayer in WGS84 DecimalDegree. I convert to an SQLiteFeatureLayer and attempt to project on-the-fly to EPSG3857, but the layer does not display.

Would you recommend that during the conversion to the SQLiteFeatureLayer the coordinate system be changed? Then there would be no need for an on-the-fly projection.

The ShapeFileFeatureLayer contains polygons.

Would you offer a few lines of code that shows how to change the coordinate system?



I’ve successfully converted the WGS84 ShapeFileFeatureLayer to SQLiteFeatureLayer that now renders properly.

What I did was to create a Projection on the ShapeFileFeatureLayer using the From & To coordinate systems below. Once the projection was assigned to the layer each feature from the ShapeFileFeatureLayer is read and then added as a new record to the SQLiteFeatureLayer.

When the SQLiteFeatureLayer is used the MapUnit is set to Meter and then it renders properly with EPSG3857.



GEOGCS[“WGS84(DD)”, DATUM[“WGS84”, SPHEROID[“WGS84”, 6378137.0, 298.257223563]], PRIMEM[“Greenwich”, 0.0], UNIT[“degree”, 0.017453292519943295], AXIS[“Geodetic longitude”, EAST], AXIS[“Geodetic latitude”, NORTH]]


Hi Dennis,

Thanks for your share. You’re right, set projection to FeatureSource.Projection can make the features from shape file converted to target projection.