|
POST
|
Happy to try to help. I've never used the MakeQueryLayer tool before, so everything I said was just a guess. If that doesn't work for you, you're best bet is to contact Support and to get one of them working on it. I think I've about reached the limit of what I can advise on GeoNet.
... View more
09-24-2015
11:19 AM
|
2
|
0
|
1402
|
|
POST
|
This might still be a syntax problem. Technically, an arcpy geoprocessing tool call produces a "Result object". Sometimes you can pass that result object in as input for another tool, and the other tool is able to figure out what to do with it. However, a more correct thing to do would be to retrieve the tool's actual output and pass that output as input to another tool. Your code: inDestinationName = prov inSQLQueryProv = "Select * from PCPToRecipRatio.dbo." + prov print inSQLQueryProv inDestinationFeatures = arcpy.MakeQueryLayer_management(inDestinationProvidersFilePath,prov,inSQLQueryProv,"UniqueRecordID","POINT") arcpy.na.AddLocations(outNALayer,destinationsLayerName,inDestinationFeatures,"Name UniqueRecordID #", searchTolerance,"UniqueRecordID","Streets_Updated_LenMin SHAPE;Streets_Updated_LenMin_ND_ND_Junctions NONE","MATCH_TO_CLOSEST","CLEAR","NO_SNAP","#","INCLUDE") Suggestion: inDestinationFeatures = arcpy.MakeQueryLayer_management(blahblahblah).getOutput(0) Other suggestion: Instead of using the output layer object from MakeQueryLayer, try just passing the layer's string name. This also tends to work. arcpy.na.AddLocations(outNALayer,destinationsLayerName,prov,...)
... View more
09-24-2015
11:04 AM
|
0
|
2
|
1402
|
|
POST
|
Not sure what tool/syntax you're using for your layer query. Can you post another python code snippet?
... View more
09-24-2015
10:10 AM
|
0
|
4
|
1402
|
|
POST
|
What you just said in your last paragraph above sounds very suspicious to me, so I'm inclined to agree that it sounds like an Add Locations problem. Maybe it's a search_criteria syntax problem. Your input: "Streets_Updated_LenMin SHAPE;Streets_Updated_LenMin_ND_ND_Junctions NONE" I would have thought that syntax would be okay (because often the semi-colon-separated strings are interpreted the same way as lists in arcpy), although the doc tells you to enter it in as a list of lists. Doc: [["Streets_Updated_LenMin","SHAPE"], ["Streets_Updated_LenMin_ND_ND_Junctions","NONE"]] Maybe try that? Also, are you sure that "Streets_Updated_LenMin_ND_ND_Junctions" is actually the name of your junction source, or is that a typo? Finally, when using search_criteria in Add Locations, you have to put something for all your network dataset sources. It's unclear what the behavior is if you have, for instance, multiple edge sources, but you only specify the behavior of one of them. So, are all your network dataset source feature classes accounted for in the search_criteria above? If not, put something for all of them, and see if that helps.
... View more
09-24-2015
09:29 AM
|
0
|
6
|
1402
|
|
POST
|
Hmm, well, none of that looks problematic. Can you describe the differences you're seeing between the python results and ArcMap? Is one showing considerably longer distances than the other, or are the results just different all over the place? Are the results in ArcMap identical each time you run Solve in ArcMap, and are the results in python identical every time you run Solve in python?
... View more
09-24-2015
08:40 AM
|
0
|
8
|
2923
|
|
POST
|
I'm guessing that the problem is most likely one of the following: - In your python code, when you run arcpy.na.MakeODCostMatrixLayer(), you aren't feeding it exactly the same parameters as the layer you have in ArcMap (where many of the parameters are set to defaults). So maybe you have a different impedance attribute, or some restrictions are toggled differently. - When you add your origins and destinations, maybe the field mapping isn't working the same as it is in ArcMap. In ArcMap, it's super easy to use the field mapping control on the Load Locations dialog. In python, you need to use either a correctly formatted text string or an arcpy.na.NAClassFieldMappings() object. I know you can't upload your data, but can you upload a snippet of your python code? Otherwise, it's virtually impossible to diagnose this problem.
... View more
09-24-2015
08:05 AM
|
0
|
10
|
2923
|
|
POST
|
Hmm, I don't know why things would have changed with an upgrade to 10.3, and it sounds like this issue might be a bit complicated and not resolvable on GeoNet. I think you would do well to call Tech Support for this issue. They can look at your data in detail and see if they can identify what's happening. Esri Support
... View more
09-17-2015
01:03 PM
|
1
|
1
|
3544
|
|
POST
|
By the way, from the behavior you are describing with restrictions not being obeyed, it sounds like your network attributes (particularly the restriction attributes) might be set up incorrectly. Perhaps before deciding for good to use barriers, you should check your attributes to make sure they are correct, in case, even with the barriers, the results might be wrong. If you can further describe the issue you're having and give some details about your restriction attribute, I can try to help you debug the problem.
... View more
09-17-2015
10:27 AM
|
0
|
3
|
3544
|
|
POST
|
Yes. Save the barriers as a feature class and then, in your python script, add them to your NA layer using Add Locations just as you do with your Stops (or Facilities or Origins or Destinations or whatever, depending on the NA layer type).
... View more
09-17-2015
10:03 AM
|
1
|
4
|
3544
|
|
POST
|
Unfortunately, it is not possible to create a new network dataset in Pro 1.1. This functionality will be available in a future release. For the mean time, you need to create network datasets in ArcMap or ArcCatalog, but once you have created them, you can use them in Pro.
... View more
09-10-2015
10:32 AM
|
0
|
2
|
1868
|
|
POST
|
It's in the field mapping part (labeled as Location Analysis Properties below). Did you scroll all the way to the bottom of this window?
... View more
08-20-2015
10:53 AM
|
0
|
0
|
2085
|
|
POST
|
Hi Thomas. Good news! This should be easy to do. When you're setting up your cost attribute, in the Evaluators dialog, you should see a column called Direction, and there should be two entries for each source feature class for your network, From-To and To-From. This is where you can have the network calculate a different cost depending on the direction of travel. Note: You need to make sure the direction of digitization for your rail line edges is consistent. If From-To isn't consistently East-West (or vice-versa), then you're going to get funky answers. I believe there's a flip tool in the Editing toolbox, so you might end up having to flip some lines.
... View more
08-17-2015
12:55 PM
|
1
|
0
|
1258
|
|
POST
|
You can download this package of tools from ArcGIS Online to create a network dataset that uses GTFS transit schedule data. http://www.arcgis.com/home/item.html?id=0fa52a75d9ba4abcad6b88bb6285fae1 The download includes instructions on how to set it up. However, you will have to have an editable street feature class that you can use as the basis for your network dataset. You can obtain streets from your city, county, or metropolitan planning organization, OpenStreetMap, or from Esri's Streetmap Premium product (a newer file geodatabase version rather than the old SDC version you're using).
... View more
08-17-2015
08:19 AM
|
0
|
0
|
830
|
|
POST
|
What about using census blocks instead of block groups?
... View more
08-13-2015
08:42 AM
|
0
|
0
|
840
|
|
POST
|
Once the network has been created, you can add it to ArcMap and use the Network Identify tool (on the Network Analyst toolbar on the right side) to click on streets and see which other streets and junctions they are connected to. The Network Identify window gives you a list of stuff the identified street is connected to, and you can click each one and have them flash in the map. If roads that look like they should be connected don't show up in this list, then they aren't connected. However, I agree with Chris Donohue that it's better to fix these errors before creating your network dataset in the first place.
... View more
08-06-2015
08:38 AM
|
2
|
1
|
9096
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 06-12-2026 01:53 PM | |
| 1 | 04-21-2026 08:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|