Generate geometry data by Postgis to adapt specific projection of mapnik

16 views
Skip to first unread message

Cường Văn

unread,
Feb 25, 2017, 9:27:47 AM2/25/17
to mapnik
Hello everyone,

I've already run successful node-mapnik-sample-code with postgis database, data sample is world_merc.shp , 
the projection format is: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
Postgis database has many column but I think the most valuable is geom fields, due to when I delete other fields, points were still rendered success.
Now I have lat long value which is 47.040315, 7.256868 respective, how I can convert these value to geom value in order to show that point on map. I already try this command in postgis: UPDATE tableName SET geom = ST_SetSRID(ST_MakePoint(lat,lon),4326); (lat = 47.00315 and lon = 7.256868), but the point shows on the tile is not at expected position, so anyone can help me with this problem, please?

I really appreciate your help.

Nguyễn Hoàng Nam

unread,
Feb 25, 2017, 9:32:58 AM2/25/17
to map...@googlegroups.com
Dear, 

Normally, geometry data will be imported from ArcGIS shapefile via PostGIS extension of Postgres. So, let make your points with ArcGIS and import it into Postgres. 

--
You received this message because you are subscribed to the Google Groups "mapnik" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapnik+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cường Văn

unread,
Feb 25, 2017, 9:41:29 AM2/25/17
to mapnik
It will be quite complicate because I have lat lon data from api, update every hour, and I just need to draw those points on tile, and to be honest, I'm not familiar with ArcGIS and Postgres as well, so whether exist an easier way to obtain my expectation?
To unsubscribe from this group and stop receiving emails from it, send an email to mapnik+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages