|
POST
|
Hi Asante, Thank you very much for your quick reply. I add the "featureLayer.loadAsync();" but the screen still keep blank. I replaced "ArcGISMap map = new ArcGISMap();" with "ArcGISMap map = new ArcGISMap(Basemap.createStreetsVector()); " , the app only show basemap with no my shapefile points.
... View more
02-27-2018
07:46 AM
|
0
|
4
|
3502
|
|
POST
|
Hi All, I am very new in ArcGIS Runtime SDK for Android 100.2.0. Android studio 3 platform is used to load a local shapefile in my android mobile,but nothing shown. MainActivity.java as below. Any idea? package com.example.interfly.displaymap; import android.graphics.Color; import android.os.Environment; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.esri.arcgisruntime.data.ShapefileFeatureTable; import com.esri.arcgisruntime.layers.FeatureLayer; import com.esri.arcgisruntime.mapping.ArcGISMap; import com.esri.arcgisruntime.mapping.Basemap; import com.esri.arcgisruntime.mapping.LayerList; import com.esri.arcgisruntime.mapping.view.MapView; import com.esri.arcgisruntime.symbology.Renderer; import com.esri.arcgisruntime.symbology.SimpleFillSymbol; import com.esri.arcgisruntime.symbology.SimpleLineSymbol; import com.esri.arcgisruntime.symbology.SimpleMarkerSymbol; import com.esri.arcgisruntime.symbology.SimpleRenderer; import com.esri.arcgisruntime.symbology.Symbol; import java.io.File; import static android.media.MediaCodec.MetricsConstants.MODE; public class MainActivity extends AppCompatActivity { private MapView mMapView; @Override protected void onPause(){ mMapView.pause(); super.onPause(); } @Override protected void onResume(){ super.onResume(); mMapView.resume(); } public String getSDPath(){ File sdDir = null; boolean sdCardExist = Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED); // sd card exist? if (sdCardExist) { sdDir = Environment.getExternalStorageDirectory();// get root dir. } return sdDir.toString(); } protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mMapView = findViewById(R.id.mapView); ArcGISMap map = new ArcGISMap(); //ArcGISMap map = new ArcGISMap(Basemap.createStreetsVector()); String shpPath=getSDPath()+ "/arcgis/shapefile/GeoNet_cmt.shp"; ShapefileFeatureTable shapefileFeatureTable_geo = new ShapefileFeatureTable(shpPath); FeatureLayer featureLayer = new FeatureLayer(shapefileFeatureTable_geo); featureLayer.setRenderer(new SimpleRenderer(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CIRCLE, Color.RED, 10))); map.getOperationalLayers().add(featureLayer); mMapView.setMap(map); } }
... View more
02-26-2018
07:20 PM
|
0
|
10
|
4648
|
|
POST
|
Usually a cad file has a translation, rotation and/or scaling relative to original base map to make the sketch convenient for vision. Generally there is a cad layer labeling the original controlling coordinate points by which you can fix the projection.(this layer may be turned off in cad). Map provider should be consulted if no controlling points layer.
... View more
11-30-2017
01:13 AM
|
0
|
0
|
4235
|
|
POST
|
Than you Basson, but I am tring to write a tool not only for myself.
... View more
01-24-2017
03:52 AM
|
0
|
1
|
3544
|
|
POST
|
The x and y will be used as float, so decimal seperator problem still exists.
... View more
01-24-2017
02:49 AM
|
0
|
3
|
3544
|
|
POST
|
01-24-2017
02:04 AM
|
0
|
5
|
3544
|
|
POST
|
Thank you Basson. Line 2 return: RuntimeError: Object: CreateObject cannot create geometry from inputs. arcpy.AddMessage(type(point)) show: <type 'geoprocessing value object'>
... View more
01-24-2017
01:58 AM
|
0
|
7
|
3544
|
|
POST
|
HI all I am puzzled by a simple problem. I don't know how to access a point object's x and y coordinate from a arctoolbox in python script. It can be accessed this way: pnt=arcpy.GetParameterAsText(0).split() # c1 is a point object in arctoolbox interface x=float(pnt[0]) y=float(pnt[1]) It's not ideal because the code will fail when the x and y are inputed in different decimal seperator, say ',' format. So I use: pnt=arcpy.GetParamete(0) But what's the method to get pnt.X and pnt.Y?
... View more
01-23-2017
08:30 PM
|
0
|
9
|
4935
|
|
POST
|
Hi all, Is it possible to transform a Geometry object with a spatialreference to another coordinate system directly? I know i can store the geometry object to featrueclass and use project_management tool to do that, but that's too trivial .
... View more
01-16-2017
09:31 PM
|
0
|
5
|
2791
|
|
POST
|
Add Larer-->Ritght key click-->Display X,Y data-->Select X,Y, Z field, Edit Coordinate System-->Right click on the points layer-->Export Data to shape file. A elevation points featrueClass constructed. It can be conversed to polygon if you want. Lambert coordinate systems are ready for Arcmap, It's best to keep projection coordinate system rather than lat/long format if you want to do further spatial analysis, say Slope.
... View more
01-04-2017
05:24 PM
|
1
|
0
|
4146
|
|
POST
|
Thank you Strauch, I read the subject you posted and am working with ModelBuilder to see whether it can do.
... View more
01-03-2017
08:19 PM
|
0
|
0
|
1334
|
|
POST
|
Dan is right. The n value must be varied with diameter according to some formula. A dense fishnet should be better choice.
... View more
01-02-2017
06:26 AM
|
0
|
0
|
2684
|
|
POST
|
Hi Amila,may be you can try python like below: def circle_poly(x,y,c1,c2,r): #center, start angle, end angel, diameter ptc=arcpy.Array() pnt=arcpy.Point() n=100 # 100 points every arc, or other value for i in range(0,n+1): # n is the number of points of the arc ang = (c1+(c2-c1)*i/n) * deg2rad pnt.X=x + r * math.cos(ang) pnt.Y=y + r * math.sin(ang) ptc.add(pnt) # return ptc Then : pie=arcpy.Polygon(circle_poly(x0,y0,0,359,dia),sr ) By this way, I believe circles can be constructed with no error cause you can control the numbers of points of every arcs. By the way, It makes me remember my old post of "How many points are need to construct a smooth circle" , I still wonder how the ArcMap platform decide the numbers of a circle.
... View more
01-02-2017
01:18 AM
|
0
|
0
|
2684
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-04-2017 05:24 PM | |
| 1 | 12-05-2016 02:28 AM | |
| 1 | 04-13-2020 09:34 PM | |
| 1 | 05-23-2019 06:46 AM | |
| 2 | 03-06-2019 05:25 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-21-2026
09:10 PM
|