Difference tow type of Shp File - gis

i have two type of *.SHP file.
in QGIS when i get Layer properties seee this Information
this is true format
this is false format
how can i change picture 2 format to picture one format ?
what is difference between two file
i see only extent is different and how can change extent of SHP File
how to get GEOJSON File from this SHP File

You are right that it can't be a correct extent in EPSG 4326, but then either the extent is wrong, or the CRS is wrong, or the file is corrupted.
You can try to update the extent: Layer->Layer Properties->Source->Update extent
but I doubt this will solve the problem.
Or you can try to guess the projected coordinate system of the second layer (epsg 32640?)

Related

Julia: Visualize images saved in csv form

What would be the best way of visualizing images saved in .csv format?
The following doesn't work:
using CSV, ImageView
data = CSV.read("myfile.csv");
imshow(data)
This is the error:
MethodError: no method matching pixelspacing(::DataFrames.DataFrame)
Closest candidates are:
pixelspacing(!Matched::MappedArrays.AbstractMultiMappedArray) at /Users/xxx/.julia/packages/ImageCore/yKxN6/src/traits.jl:63
pixelspacing(!Matched::MappedArrays.AbstractMappedArray) at /Users/xxx/.julia/packages/ImageCore/yKxN6/src/traits.jl:62
pixelspacing(!Matched::OffsetArrays.OffsetArray) at /Users/xxx/.julia/packages/ImageCore/yKxN6/src/traits.jl:67
...
Stacktrace:
[1] imshow(::Any, ::Reactive.Signal{GtkReactive.ZoomRegion{RoundingIntegers.RInt64}}, ::ImageView.SliceData, ::Any; name::Any, aspect::Any) at /Users/xxx/.julia/packages/ImageView/sCn9Q/src/ImageView.jl:269
[2] imshow(::Any; axes::Any, name::Any, aspect::Any) at /Users/xxx.julia/packages/ImageView/sCn9Q/src/ImageView.jl:260
[3] imshow(::Any) at /Users/xxx/.julia/packages/ImageView/sCn9Q/src/ImageView.jl:259
[4] top-level scope at In[5]:2
[5] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091
Reference on github.
This question was answered at https://github.com/JuliaImages/ImageView.jl/issues/241. Copying the answer here:
imshow(Matrix(data))
where data is your DataFrame. But CSV is a poor choice for images; Netbpm if you simply must use text-formatted images, otherwise binary would be recommended. Binary Netpbm are especially easy to write, if you have to write your own (e.g., if the images are coming from some language that doesn't support other file formats), otherwise PNG is typically a good choice.
Does the CSV file have a header line of names for its columns or is it just a delimited file full of text number values?
If the CSV file is actually in the form of a matrix of values, such that the values are the bytes of a 2D image, you may use DelimitedFiles -- see readdlm() docs. Read the file with readdlm() into a matrix and see if ImageView can display the results.

Should the structure of a derived obj file coinside with the naming of the original step file?

When using the Model Derivative API I successfully generate an obj representation from a step file. But within that process are some quirks that I do not fully understand:
The Post job has a output.advanced.exportFileStructure property which can be set to "multiple" and a output.advanced.objectIds property which lets you specify the which parts of the model you would like to extract. From the little that the documentation states, I would expect to receive one obj file per requested objectid. Which from my experience is not the case. So does this only work for compressed files like .iam and .ipt?
Well, anyway, instead I get one obj file for all objectIds with one polygon group per objectId. The groups are named (duh!), so I would expect them to be named like their objectId but it seams like the numbers are assigned in a random way. So how should I actually map an objectId to its corresponding 3d part? Is there any way to link the information from GET :urn/metadata/:guid/properties back to their objects?
I hope somebody can shine light on this. If you need more information I can provide you with the original step file, the obj and my server log.
You misunderstood the objectIds property of the derivatives API: specifying that field allows you to export only specific components to a single obj, for example your car model has 1000 different components, but you just want to export components that represent the engine: [34, 56, 76] (I just made those up...). If you want to export each objectId to a separate obj file, you need to fire multiple jobs. the "exportFileStructure" option only applies to composite designs (i.e. assemblies) single: creates one OBJ file for all the input files (assembly file), multiple: creates a separate OBJ file for each object. A step file is not a composite design.
As you noticed the obj groups are named randomly. As far as I know there is no easy reliable way to map a component in the obj file to the original objectId because .obj is a very basic format and it doesn't support metadata. You could use a geometric approach (finding where is the component in space, use bounding boxes, ...) to achieve the mapping but it could be challenging with complex models.

Using an Excel file in ArcMap 10.3

I need to take an Excel file that includes many columns, two of which are longitude and latitude.
How do I get ArcMap to accept this file as spatial data, and map it based on the lat/long data?
My data is from this page which allows for developers to access the raw data. I downloaded the data and loaded it into an excel file, and that's as far as I could get.
What you're looking for is Add XY Data. You can find it in the File menu (File / Add Data / Add XY Data...)
The dialog box that comes up asks you to indicate the table that was added, what columns contain XY data, and (ideally) the coordinate system of the XY data.
Note: Sometimes it helps to convert an Excel spreadsheet to plain CSV data first; ArcMap can be finicky about fields formatted as text instead of numbers, for example.
Add XY data will do the job. Just make sure that the values of latitude and longitude do not have trailing whitespace, otherwise, ArcMap doesn't show those columns when it prompts to choose the columns for x and y.

How to convert multiple images to csv?

I want to run some images through a neural network, and I want to create a .csv file for the data. How can I create a csv that will represent the images and keep each image separate?
One way to approach is to use numpy to convert image to array, which can then be converted to a CSV file or simply a comma separated list.
The csv data can be manipulated or original image can be retrieved when needed.
Here is a basic code that demonstrates above concept.
import Image
import numpy as np
#Function to convert image to array or list
def loadImage (inFileName, outType ) :
img = Image.open( inFileName )
img.load()
data = np.asarray( img, dtype="int32" )
if outType == "anArray":
return data
if outType == "aList":
return list(data)
#Load image to array
myArray1 = loadImage("bug.png", "anArray")
#Load image to a list
myList1 = loadImage("bug.png", "aList")
You can encode your image in Base64 and still use CSV, since commas are not part of characters in Base64.
See: Best way to separate two base64 strings
If possible, create a storage location just for images. If your images have unique filenames, then all you need to track is the filename. If they do not have a unique filename, you can assign one using a timestamp+randomizer function to name the photo. Once named, it must be stored in the proper location so that all you need is the filename in order to reference the appropriate image.
Due to size constraints, I would not recommend storing the actual images in the csv.
Cheers!
I guess that depends a lot on what algorithm and what implementation you select. It is not even clear that CSV is the correct choice.
For your stated requirements, Netpbm format comes to mind; if you want to have one line per image, just squish all the numbers into one line. Note that the naive neural network will ignore the topology of the image, you'd need a bit advanced setup to include it.

Data format and X/Y configuration for dynamic csv display

I am trying to understand the demo at http://www.highcharts.com/demo/line-ajax which plots data using a csv file fetched through an ajax call.
Highcharts appears to assume that first column is X axis, with subsequent columns being Y axes data with the same units. The series part in the provided jsfiddle can be completely removed and example still runs the same, so I believe its not being used when data csv property is set. I was also unable to find any explanation of the csv property in Highcharts API docs.
Note: This example is using a different approach from other csv documentation on the site.
The csv format allowed does not seem to support double quotes. Also, I can get data with 2 columns to render, but I was wondering if there is any way to tell Highcharts to use 2 particular columns for X & Y axes while ignoring other columns in the input csv.
Is there a good reference to configuration settings available when using data csv property as in the given example?
Is there any example of a composite chart with spline & scatter plots created dynamically from csv data fetched thru ajax?
Docs for data.js plugin is described inside the data.js file.
And demo for spline and scatter: http://jsfiddle.net/3qv11owm/
series: [{
type: 'scatter'
}, {
type: 'spline'
}]
Options from series array are merged with series from CSV.