Hot answers tagged

68

I found this response - written by a Google employee - this would probably be the most accurate one: This won't be accurate, because the resolution of a map with the mercator projection (like Google maps) is dependent on the latitude. It's possible to calculate using this formula: metersPerPx = 156543.03392 * Math.cos(latLng.lat() * Math.PI / 180) / Math....


20

Assuming you are talking about a map of the world in Mercator Projection, Something like this: Then, You should know that not all pixels will represent the same area. There is a large amount of distortion as you move towards the poles, the area represented by each pixel will decrease. Tissot's indicatrices show a good visual representation of the ...


20

Yes, it is possible. What you need is rule-based Styling with a scale rule as shown in the image (sorry for german layout) It looks like this when you zoom in and out : keep in mind, that when you zoom out of the defined zoom levels, the layer won't be shown. EDIT: To have different styles within a category you can refine the rules by right-clicking on a ...


15

Straightforward authoritative correct answer: 591657550.500000 / 2^(level-1) it gives you the table above, entering the zoom level. Try it live on jsfiddle.net Because the question is only for Google MAPS, not EARTH, the OP doesn't care about 3D geometry. Google maps are ALREADY flattened so 1 pixel is always the same distance (in DEGREES, which is what ...


15

I don't think there's an option yet which allows you to put the units below the scalebar. An alternative could be to: Modify your current scalebar and set its Font colour to match the background colour: Item Properties > Fonts and colours > Font colour Copy your scalebar and paste it directly below your original scalebar. Then set its Font colour to ...


13

@Gerardo's answer is only correct at the equator. The gdaldem doc notes those scale values are for "LatLong projections near the equator" To calculate the scale or Z factor (inverse of scale) at other latitudes for a dem with vertical units in metres, you can use the following equations: s=111320*cos(latitude*pi/180) z=1/(111320*cos(latitude*pi/180)) ...


13

You can get the current zoom level using getZoom(). Assuming that you're using the tile layer system as used by Google Maps, Bing, Open Street Map and Esri, you can use that to infer the scale - see What ratio scales do Google Maps zoom levels correspond to? If you're not using that tile system, you may need to find another way to infer the scale from the ...


12

You need to use Rule based style to set the scale for primary, secondary and tertiary network, as you can see below (but with different data): You can double-click each styled label to get more details:


10

EPSG:3857 doesn't conserve distances so this will depend on where on the earth you are mapping - I think the scale is calculated at the Equator. The easiest fix for this is to switch to an equidistant projection like: EPSG:102014 or other depending on your region of interest.


9

That's what the lock icon next to the scale does.


8

If you want to increase the size of a feature, you can use the Scale tool in ArcMap. It's an Editor tool but it's not on the toolbar by default, you'll need to add it using the Customize option for toolbars. It can be found under the Editor category: You can scale up your features by a Scale Factor by selecting your features, activating the Scale tool, ...


8

Standard linked by @user30184 (portal.opengeospatial.org/files/?artifact_id=35326) explicitly and precisely defines ScaleDenominator in section 6.1 "Tile matrix set – the geometry of the tiled space": The scale denominator is defined with respect to a "standardized rendering pixel size" of 0.28 mm × 0.28 mm (millimeters). Scale of tiled ...


7

Rasters don't really have a scale, they have a resolution, which in your case is 200m. You can calculate an appropriate viewing scale for a given raster resolution based on the ability to distinguish features. The ArcGIS Blog post On map scale and raster resolution discusses this: In 1987, Waldo Tobler, renowned analytical cartographer (now emeritus ...


7

Not at all. When you have some data that was digitized at 1:100,000, it excluded smaller features, which were smaller than the Minimum Mappable Area. For example, suppose you are dealing with topographic data.At 1:100,000 you would exclude large streams and trees.These features are visible at 1:24,000, and should be included in such a map. If you just ...


7

First, a note about map scales. A map scale represented as a unitless factor (e.g. 1:50000) means that a map unit represents X map units (e.g. a meter in the map = 50 km in reality). This kind of scale is simply impossible to achieve in web maps, as you cannot be sure of the physical screen size. Think about a laptop connected to a projector screen, having ...


7

I have to say that what you are requesting is complicated a little bit because you want the labeling to be visible at small scale clearly as well as at large scale (best fit). So, the idea here is how to place the point that can be visible at different scales. After several testing, I found that instead of creating several columns for each scale range and ...


6

In QGIS it's not called Reference Scale. You can make sure line thickness and font size are visually the same in the map canvas and the print composer (regardless of paper size and extent) if you size your font labels and line styles using Map Units instead of points, mm, etc... There is also the option to use non-map units, and in that case you can just ...


6

Below SLD code works for scale range: <NamedLayer> <Name>grid</Name> <UserStyle> <FeatureTypeStyle> <Rule> <MinScaleDenominator>300000</MinScaleDenominator> <MaxScaleDenominator>1000000</MaxScaleDenominator> <PolygonSymbolizer> <Stroke> &...


6

I have test it a bit and seems to work correct. Inspired from this var res = getResolutionFromScale(200000); alert(res); function getResolutionFromScale(scale){ var units = map.getView().getProjection().getUnits(); var dpi = 25.4 / 0.28; var mpu = ol.proj.METERS_PER_UNIT[units]; var resolution = scale/(mpu * 39.37 * dpi); return ...


6

If you want just the label: // add a scale at at your map. var scale = L.control.scale().addTo(map); // Get the label. var metres = scale._getRoundNum(map.containerPointToLatLng([0, map.getSize().y / 2 ]).distanceTo( map.containerPointToLatLng([scale.options.maxWidth,map.getSize().y / 2 ]))) label = metres < 1000 ? metres + ' m' : (metres / 1000) + ' ...


6

A PDF file has a controlled page size that can be used by the reader app (Adobe Reader or similar) to output a set page size when printed. Image files such as TIFF, PNG, BMP etc., are not a page at all, they're a picture/photo. Their size is dependant on the resolution and dimensions of the image in pixels, not a set page size. While I believe you ...


6

Because of Pseudo Mercator? Pseudo Mercator is not a proper Coordinate System to measure areas. Depending where you are on Planet Earth, there can be huge differences in area-size compared to other coordinate systems that try to reduce distortion.


6

You can use QAD Plugin which has a scale option, and you can enter a scale factor to scale your feature. If you are familiar with AutoCAD, this plugin works almost same, and it is very powerful. For the QAD plugin to work properly, the features should be projected either in meter or foot. It does not work with geographic coordinates. Also, you should work ...


6

The solution You have defined a wrong CRS. To solve the problem: Right-click your layer, set CRS back to EPSG:4326. Now it is in the correct place: Always load a basemap in the background to check if your data is in the right place! Now re-project your layer to an appropriate CRS (e.g. EPSG:7755, but there might be better ones) with one of these two ...


5

DPI means dots per inch. For your scanned map it is better to use PPI (pixels per inch). 150 DPI = 150 PPI = 150 pixels per 1 inch = 150 pixels per 2.54 cm = 150 pixels per 0,0254 m So 1 pixel has the size of 0.0254 m / 150 = 0.00016933 m. The scale of our map is 1:150,000. The scale is the ratio of a distance on the map to the corresponding distance on ...


5

I have written this on Android and it works. Google map tiles are 256 device independent pixels. So this first line calculates a tile size in device dependent pixels. The second calculates the number of tiles at a given zoom level. The third calculates the size of a tile in meters at a given latitude for spherical projection. Then the final line will give ...


5

The projection that you use will distort the properties of your objects. You can select your projection to preserve the shape, the area OR the distances but not all at the same time. If you want a specific feature to be preserved, you need to select a projected coordinate system with this property (conformal for shape, equal-area for area or equidistant for ...


5

You could try something like this (in QGIS v.2.8.1): miniScale = 'crs=EPSG:27700&dpiMode=7&featureCount=10&format=image/jpeg&layers=9&styles=&url=http://192.000.0.00:0000/wms_service' miniScaleLayer = QgsRasterLayer(miniScale, 'MiniScale', 'wms') # Set scale based visibility miniScaleLayer.setScaleBasedVisibility(True) ...


5

according to our good friend "Tobler," whom stated in order to calculate map scale, multiply the raster resolution (which should be in meters) by 2 multiplied by 1000. So in my above question my equation ended up like this here: map scale = 200 meters x 2 x 1000 map scale = 1:400,000 there ya go of course all great data sources deserve the appropriate ...


5

This answer will derive a simple, useful rule of thumb. Its analysis suggests that within any region of diameter a, the relative error when using a suitably well-chosen map projection to measure distances within that region will typically be a/(2R) or less, where R is the earth's radius. Since R is large (over 6 million meters or 4 thousand miles), ...


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