How to project the shapefile with GDAL ogr2ogr - gdal

The GDAL ogr2ogr project the shape file with EPSG:28991 and create .prj file near Amersfoort. But the actual place of shp file should be in amsterdam.
How to reproject the shape file to locate it on amsterdam with the help of xmin ymin xmax, ymax.enter image description here

This Command can help you you convert shapefile projection when you have two different EPSGs.
ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:NEW_EPSG_NUMBER -s_srs EPSG:OLD_EPSG_NUMBER output.shp input.shp

There are a lot of reasons for why this didn't work. Do you know what the original projection of the shapefile was? Wrong placement doesn't necesarrily mean wrong projection. Is the actual data correct?
Ogr2ogr and other commandline tools are not the best solution for one-time only actions and solving such problems. Much more user friendly tool, that actually run on the same engines, is QGIS for example. You will get more visual perception on the problem and you will trouble shoot everything much faster.

Regarding the GDAL OGR, no problem in the tool itself. The prj file created contains the EPSG projection that you have assigned to the shapefile. The problem in such cases is, that the map and the shapefile layer are not on the same coordinates system which causes the shifting. To solve this problem make sure that the PRJ file generated contains the targeted coordinates system and what's more important is to assure that the map coordinates is exactly the same.

Related

ANSYS Meshing Issue - How To Mesh Complicated Geometry (~80,000 Faces)?

I am attempting to mesh a complicated design (~80,000 faces) for a microchannel heat sink, as pictured, and I would appreciate some advice. I have tried a range of different mesh controls (especially face sizing and body sizing), mesh settings and element sizes, and all have failed to produce a working mesh. The most common errors are shown in the linked picture, in particular the one regarding "The following surfaces cannot be meshed with acceptable quality. Try using a different element size or virtual topology." However, I have already reduced the element size to 2x10^-6 m, which takes two days to resolve before failure.
Unfortunately I cannot alter the geometry significantly, as it is imported from generation in SolidWORKS as either a STEP or an x.t file. As such, any advice for how I can successfully mesh the geometry for CFD analysis in FLUENT would be greatly appreciated.
I can provide more details or the geometry file itself if required.
Thanks in advance.
Meshing Attempt
Probably your cad design is not clean at all. But it is impossible to notice from this image. If you don't have control over the geometry source it is trouble. Because you might ask somebody else about check and fix something. First check you can do with your model it's trying to reduce the number of elements until the minimum possible value. Then if the mesh runs properly you can relay in the surfaces of your cad model. After that, you can refine the mesh, but the refining process is something that you have to do following some error criteria. If you are also the designer why not try to simplify a bit the geometry if you consider it is really hard to mesh? Meshing properly is a hard task, you should go step-by-step until you reach some solution. Also, you must not allow the preprocessor mesh automatically, without giving some criteria. Probably the first thing you have to answer even before apply any mesh is, what is your Reynolds number? And what is the most valuable result in which you can base the goodness of your discretization?
Thank you for your suggestions. In the end I solved the issue by importing the original mesh generated by COMSOL into SpaceClaim, then employing both the "Smooth" and "Reduce Faces" tools in tandem to simplify the geometry, before finally using SolidWORKS to turn the smoothed mesh into a solid body. This body retained many of the same features as the original, but was much less complex, having two orders of magnitude fewer faces. In turn, this permitted both meshing and heat transfer analysis in FLUENT.

Displaying large VRML file

I've VRML file that is 4.2GB big (!) and consists of 10 different shapes.
This is cloud of points (no edges or triangles).
How can I display such a big object? Everything I've tried just freezes.
Is there any tool I can use for point optimization in stream-like fashion?
Without loading the whole file?
We have developed our own tool for polygon reduction and some other optimizations. But if you say you have cloud of points and no triangles and edges, it is a difficult case.
I would try to make a separate VRML file from each shape of yours, and combine them with Inline in a big container VRML file. You may not see the whole scene, but you can possibly see the separate shapes. You can find tutorials for Inline if you google it. Hope this helps.

Error using MODIS HDF files in ArcMap Raster Calculator

I have downloaded several HDF files from the MODIS database.
According to the documentation, the layers have to be multiplied by 0.1 to obtain the real values.
I get an error when I put the name of the HDF-layer in the Raster Calculator, however it does work when I export it as a new raster before. But after multiplication with 0.1, I still do not get a continuous scale image but only black and white areas. I excluded the seven highest values as indicated in the documentation, but still no change.
Another way of getting the MODIS files is to use the respective toolbox. Data imported with this tool does show up correctly, but I cannot import most of it even though it is available under the link indicated above:
Failed to execute (CreateCustomGeoTransformation)
Failed to execute (ImportEvapotranspiration)
Has anyone experienced something similar?

create a geotiff file from undocumented tif image

I have an undocumented tiff image which I need to use with a software that can read only geotif files. my simplest idea was to pretend the image is at 0N, 0W with a pixel size of 0.00000899928° (1m) in both directions.
I have rea the thread here but I was unable to reproduce the answer.
Thanks for helping. I am a dummy in geodesics, GIS and the like.
You are attempting to georeference a raster, which is often a difficult task, with multiple techniques. It's not possible to provide an answer for your question given the information you have supplied. Also, never assume that lengths in degrees can be converted to lengths in metres (the Earth isn't flat).
Search around GIS.SE for ideas , e.g. using the [georeferencing] tag. There are tools available with QGIS to help manually georeference rasters to other geospatial data.

how to extract data from plot produced by easy.py in libsvm-3.17

I just downloaded libsvm-3.17 abt two weeks ago. I tried heart_scale (dataset provided in the libsvm-3.17 package) with easy.py. An image or plot is produced (from gnuplot) to illustrate the best c and best gamma. I cannot post the image here because I am new here and do not have enough reputation.
I would like to ask from the many colors curves in the plot, how to extract from the plot that the best log2(c)=11 (which gives c=2048) and the best log2(gamma)=-13 (which gives gamma = 0.0001220703125).
Thank you very much.
the chosen parameters are reported by easy.py (cannot run it now, but you will find them). the plot is just a visual aid to manually verify the parameter neighborhood. with some experience you can interpret the diagram. without experience simply trust easy.py