Tag Info

Hot answers tagged

10

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 ...


10

There is no direct route to convert an image into a shapefile format. Your jpg map has no spatial reference. You can load it into arcmap but it won't know where to put it. In order to tell arcmap where it belongs in space you have to provide geographic reference points, hence the term 'georeferencing'. In ArcGIS this is done via the Georeferencing ...


7

By default an RGB image will be written to an RGB color model JPEG image, but this is not actually the most efficient way of writing to JPEG. It is better to convert to the YCbCr color space, and encode that. This is in fact the typical form of standalone JPEGs and what GDAL will produce when writing to a free standing JPEG file. Compressing a 4K x 2.6K ...


6

QGIS has a plugin called "Photo2Shape" that will convert the geotagged coordinates of the photo into a shapefile. You can then use the "eVis" plugin to set up hotlinks to the photos themselves, and launch a photo viewer by clicking on the attribute field.


6

You have a few options for getting the road as a vector. You could download the Open Street Map road layer. This has been prepared by Geofabrik. You'd have to select out the road you're after. You could digitise the road manually. This involves creating a new polyline layer and tracing the road. It looks like you'll need to create a point layer too, ...


5

When you save your JPEG in GIMP, expand the 'Advanced Options' when the 'Export as JPEG' dialog box comes up. Un-check the 'Progressive' box and then click 'Export'. Your JPEG is then readable in QGIS. "Progressive" changes the encoding to display the image at increasingly higher quality levels until the image is fully loaded. QGIS is expecting standard ...


5

(1) and (2) are possible with eVis plugin (Documentation). Ad (3): You should be able to use Field Calculator to add the path to the filenames you already in attribute table. Field calculator is described here: http://www.qgis.org/wiki/Calculating_field_values. You can use + operator to concatenate strings.


4

Yes there is, but before that, what software do you have available? To georeference a non georeferenced jpeg you will need to know/have one of two sources of information. 1) Access to vector or raster data that covers the same geographical area in the jpeg 2) Knowledge of the geographical extents of the jpeg (ie: Lat/Long cooridinates or UTM coordinates) ...


4

I suspect that there are a great number of factors that go into the choice of image format and compression scheme: Image dimensions Bit depth Image complexity (images with large areas of similar colors may actually compress better by a lossless codec than a lossy codec, and some codecs handle complex, detailed areas better than others) Multi-band support ...


4

You need to include empty quotes for parameters you aren't changing. Since resolution is the 6th parameter, you shouldn't place it directly after parameter 2 (out_jpeg). The empty quotes are place markers. Example: arcpy.mapping.ExportToJPEG(mxd, project, "", "", "", resolution = 200) You don't need to put quotes in for parameters after the last one you ...


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 ...


3

How about using GDAL? It is available via FWTools (easier install) on Windows, via apt-get on Ubuntu, and via a binary for OSX. Once you have GDAL just go ahead and use: gdal_translate -of JP2OpenJPEG <input> <output> or gdal_translate -of JPEG2000 <input> <output> The above command uses the built in JP2 format conversion. ...


3

I had posted a question on creating images from vector data that you might find useful. The accepted answer, the combination of shapely, ogr, matplotlib, and numpy seems like it would work nicely for you.


2

Here is a link to the QGIS forum reporting something similar in terms of band combinations. This article is referring to rasters generated in GRASS but there maybe some similarities. Another trick that has worked for me in the past. Make sure the .jpg file has an associated world file .jgw and a projection file .prj. These can be generated from exporting ...


2

It seems QGIS doesn't set the correct band in the jpg raster. You can fix this by double clicking your raster layer and changing the bands Where it says Red, Green, Blue Band they must all be the right color bands from the jpg. Change Green band drop down to Band 2 and Blue band drop down to Band 3


2

The simplest way would be to call gdal_rasterize using subprocess.call(), but I suspect it doesn't do any interpolation so it would alias to the point of illegibility if you generated a thumbnail-sized image straight from the data. So you should generate a "reasonably sized"* temporary image and use the Python image library to scale it to the size you want. ...


2

Oh, I did this yesterday with counties in Montana! Is it too late to answer? Assuming you've already used Split to make a shapefile for each census tract, I found that it was easy (lazy) to handle them in a Group Layer. Assuming that's the only Group Layer in your document, don't be shy about opening up the ArcPy window and entering: # Setup, defining a ...


2

As @Fezter indicates, it may be worth it to seek separate sources of data. It should be fairly straightforward given how general the data is. Have a look at either OSM or US Census' TIGER files. Once you have those, including a point layer for cities, and assuming you just care about the distance to the nearest highway, not the specific point of intersect, ...


2

Please try to find out known points or nodes which are matching to Google. Try at least 3 points from Google. I know it is very difficult case but go deeply with your map and google map. or try to find out any 3 corner points of a municipal boundary. Another way is try to get a georeferenced map of your municipal corporation then try to rubber sheet it with ...


2

In answer to your first question I found confirmation of the default compression quality (number) on the help page entitled Compression (Environment setting) where it says (with my bolding): If JPEG, JPEG_YCbCr, or JPEG 2000 is selected, you can also set the compression quality to control how much loss the image will be subjected to by the ...


1

I would suggest for you to template out your map document with a pseudo image and ust replace the source using python instead of adding and removing the layer. I take that your image is an element, not actually apart of a data frame. If so, you may swap out the reference path to that image by using the sourceImage property, see code example below: ...


1

if you want to try an opensource solution for georeferencing your image with some GCPs (Ground Control Points), you can go with this way. firstly use your gcps. gdal_translate -of GTiff -gcp 0 0 31.7431761644 35.1680410195 -gcp 3527 0 31.7493769674 35.1784535489 -gcp 3527 2492 31.7431011291 35.1784951643 -gcp 0 2494 31.7431761644 ...


1

To georeference an image, you should know the lat/long values of at least 3 locations on the image. The more the better. These are called GCPs (Ground Control Points). Once you have the GCPs, you can transform the image to fit in a real world coordinate system (like lat/long). Many times you can get coordinates from the markings on the scanned map image ...


1

The method here works in ArcGIS10.1. Besides the jpg map, you also need another layer: a projected counties map. Steps include: 1. Georeference the jpg to the projected coordinate system of the projected counties 2. create a new vector with the same projected coordinate system in ArcCatolog 3. use editor to create polygon for the vector by taking the jpg as ...


1

Custom Maps created by Marko Teittinen [This app currently has 99 Five Stars out of 138 reviews] Use almost any map image as offline GPS map. Custom Maps makes it easy to create GPS maps from map images, and those maps can be used anywhere, even when you have no data signal for your Android device (it works on both phones and tablets). Custom Maps can use ...


1

If it is ok for you to get cells that have an engineering link attached, than you will find a useful and free little tool on my website. http://www.centauron.de/site/produkte/gpsphotocell/allgemein.dot?com.dotmarketing.htmlpage.language=1


1

If it's already georeferenced, for ArcGIS you could just import it as you would any other raster layer. If you need to georeference it, follow this in the helpfile: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009t000000mq000000 edit: If it is photographs rather than aerial photos, then follow this helpfile about adding HTML ...


1

Just for the sake of completeness - mapserver can also render good looking maps from a range of base data, on commandline using the shp2img utility. Again, you will need to decide on a very generic, very simple style that fits your purposes.



Only top voted, non community-wiki answers of a minimum length are eligible