Hot answers tagged convert
9
There are many free tools like:
gdal rasterize
Map Tyler
it is easy to do with Python and modules like Shapely and a simple for loop:
But in Python, the reference is Mapnik and Getting Started In Python
You create a map (width and height in pixels, background color, etc)
You create Styles which determines how the data is rendered
You add a datasource ...
5
No it's not possible.
Like PolyGeo said you could write a conversion script using arcpy that reads the QGIS project file, which is just xml, and lload each layer. There would be a bit of work but you might even be to match some of the styling. However there would be a lot of effort in this and it might not be worth it for a single project.
4
The pseudo code version:
import gdal
import numpy
create the gdal output file as geotiff
set the no data value
set the geotransform
numpy.genfromtxt('your file', numpy.int8) #looks like int from you example
reshape your array to the shape you need
write out the array.
A sample that will help you along - from here:
if __name__ == '__main__':
# ...
4
EPSG: 2163 is a Lambert azimuthal equal-area projection, and you can easily find a brief idea of the required formulas on the wikipedia page for Lambert azimuthal equal-area projection. Please note that these are valid for a sphere.
Since we work with an ellipsoid, you need more intricate forumlas.
My go to reference for projection related information is ...
4
You could add all of the layers to a mxd, then loop through them and run
arcpy.mapping.ExportToJPEG(map_document, out_jpeg, {data_frame}, {df_export_width}, {df_export_height}, {resolution}, {world_file}, {color_mode}, {jpeg_quality}, {progressive})
for each layer in the map.
3
This similar question has answers that use FME to convert DWG to JPG. The process will be similar for converting shapefiles.
This example has example workspaces you can download.
FME is well suited to handling batch processes. For example, you can point the reader to a folder and it will include all shapefiles in the folder.
I created a simple ...
2
You need to project (transform) the shape from EPSG:900913 (actually use the standard EPSG:3857) to EPSG:4326.
You can use the following code:
var gcs=new OpenLayers.Projection("EPSG:4326");
var webMercator=new OpenLayers.Projection("EPSG:3857");
/*I am assuming that you have a polygon in web mercator. You can do this for points and lines as well*/
var ...
2
Another option is to convert the coordinates BEFORE you import them into ARC. You can just convert UTM do decimal degrees using an online batch convertor, for example http://www.hamstermap.com where you just copy/paste your UTM coordinates.
2
Converted
Télécharger GEOFLA® Communes France Métropolitaine (7z de 10,2 Mo)
in QGIS (1.9) to Geojson.
Opened the Shapefile Save as (set Projected CRS to WGS84) then save as
geojson.
produced a 38mb file
First Feature is:
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "ID_GEOFLA": 1, "CODE_COMM": "271", ...
2
Use the Haversine Formula to calculate distance between two points. Here is a simple Python version that returns the distance in kilometers:
from math import cos, sin, asin, sqrt, radians
def calc_distance(lat1, lon1, lat2, lon2):
"""
Calculate the great circle distance between two points
on the earth (specified in decimal degrees)
"""
...
2
You say "I'm stuck in iterating all the input folders" so that is the Question this Answer addresses.
Iterating through ArcGIS workspaces becomes much easier at ArcGIS 10.1 SP1 using arcpy.da.Walk.
However, it could be done using earlier versions of arcpy and arcgisscripting using os.walk as described here or glob and other techniques as described here.
1
First, figure out the point that is at 0,0 on your layout. Lets say you're using mercator projection with a scale of 1:100 and the point at 0,0 on the page is 627103E 4484335N. A point you are trying to map is 627107E 4484342N so to figure out the position it would (E2-E1)/100, (N2-N1)/100. Putting it at 4cm, 7cm on the page. If it's rotated then you ...
1
Clearly you need some batch processing method. Unfortunately, I don't recall Meshlab having any means of natively reading shapefiles so some coding there would be necessary. Meshlab is a great package but I've never tried extending it as I tend to use Blender.
FME has been recommended and if you have it (perhaps as the Data Interoperability Suite) then ...
1
This was my final solution. There are basicaly two tools that are needed to convert *.xyz to arcmap friendly raster format. You can use this script when adding a script tool to arcmap toolbox. Some parameters are set for my example (e.g. resolution is 5 m).
import arcpy
arcpy.CheckOutExtension("3D")
workspace=arcpy.GetParameterAsText(0)
arcpy.env.workspace ...
1
concatenate all your xyz files together
use a csv2dbf converter, because your xyz file is a form of csv file. There are tons of those available by googling. I found python source code at https://github.com/fitnr/census2dbf/blob/master/census2dbf.py , which seems to be a generic csv2dbf python module, despite the name.
import this big dbf into arcgis
or
...
1
gdaltransform will work, I must've just missed you on irc. I assume that 3tm is the projection here:
http://spatialreference.org/ref/epsg/3776/
to convert to WGS84 longitude/latitude:
gdaltransform -s_srs epsg:3776 -t_srs epsg:4326
Then type in your coordinates.
Only top voted, non community-wiki answers of a minimum length are eligible



