ThinkGeo.com    |     Documentation    |     Premium Support

SQLiteFeatureLayer - Get Projection

MapSuite Team,

Is there a way to get the projection string of an SQLiteFeatureLayer from within the layer itself?

Thanks,
Dennis

Hi Dennis,

We don’t have related API to read projection information from Sqlite database, and our sample Sqlite database don’t contains projection table.

If your database contains the information, you can read them via Sql statement, we have an API named ExecuteSqlQuery support that.

Regards,

Ethan

Ethan,

I would think that somehow the internals of MapSuite have to know the projection of SQLiteFeatureLayer in order to properly render the layer.

Are you saying that the projection is there and it’s just that MapSuite does not have an API to retrieve it?

There is no column within my SQLite database that contains the projection, that would be pointless as every feature would have the same value for projection.

Thanks,
Dennis

Hi Dennis,

The Sqlite is just a data container, if your data don’t have a special table or column to save the data projection, the map don’t know what’s the projection from the shape data.

That’s just the same like we don’t know which projection is only from the shape file, we also need its corresponding .prj file.

In our sample, the projection information is contained in the sqlite file name.

Regards,

Ethan

Ethan,

You’ve made reference to “our sample”, would you provide a link to that sample please?

Thanks,
Dennis

Hi Dennis,

I means this sample: https://github.com/ThinkGeo/WorldStreetsLayerSDKOnWindows-ForWinForms

Its data is just like this:
WorldMapKit-4326-20160918-1100044187.sqlite
DallasCounty-3857-20170218.sqlite

You can see the projection 4326 is contained in the name.

Regards,

Ethan